Próbáld meg így.
public GateCloseBank(playerid)
{
MoveDynamicObject(bankkapu,-1991.5999755859, 543.40002441406, 34.400001525879, 0.97);
PlayerPlaySound(playerid, 1153, -1991.5999755859, 543.40002441406, 34.400001525879);
bankk = 0;
return 1;
}
bankkapu = CreateDynamicObject(980, -1991.5999755859, 543.40002441406, 34.400001525879, 0, 0, 270);
else if(IsPlayerInAnyVehicle(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, 5,-1996.6665,543.9191,35.0156))
{
if(bankk == 1) { SendClientMessage(playerid, COLOR_GREY, \"* A fizetõs parkoló kapuja már ki van nyitva!\"); return 1; }
MoveDynamicObject(bankkapu,-1991.5999755859, 543.40002441406, 31.299999237061, 8.0, 0.0, 0.0, 270);
SetTimer(\"GateCloseBank\", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE,\"* A fizetõs parkoló kapuja nyitva! 7 másodperc és becsukódik!\");
format(string, sizeof(string), \"* Valaki kinyitotta a fizetõs parkoló kapuját.\", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
PlayerPlaySound(playerid, 1153, -1991.5999755859, 543.40002441406, 34.400001525879);
SafeGivePlayerMoney(playerid, - 10);
bankk = 1;
}
else if (IsPlayerInRangeOfPoint(playerid, 5,-1983.1833,544.2742,35.0156))
{
if(bankk == 1) { SendClientMessage(playerid, COLOR_GREY, \"* A fizetõs parkoló kapuja már ki van nyitva!\"); return 1; }
MoveDynamicObject(bankkapu,-1991.5999755859, 543.40002441406, 31.299999237061, 8.0, 0.0, 0.0, 270);
SetTimer(\"GateCloseBank\", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE,\"* A fizetõs parkoló kapuja nyitva! 7 másodperc és becsukódik!\");
format(string, sizeof(string), \"* Valaki kinyitotta a fizetõs parkoló kapuját.\", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
PlayerPlaySound(playerid, 1153, -1991.5999755859, 543.40002441406, 34.400001525879);
bankk = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY,\"* Túl messze van.\");
return 1;
}
}