#include <a_samp>new bool:open = false, gate, timer;forward AutoCheck();public OnFilterScriptInit(){ timer = SetTimer(\"AutoCheck\", 2500, 1); gate = CreateObject(983, 60.200000762939, -249.5, 1.2999999523163, 0.0000, 0.0000, 0.0000, 50.0); return 1;}public OnFilterScriptExit(){ KillTimer(timer); DestroyObject(gate); return 1;}public AutoCheck(){ new bool:o; for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i,8.0,60.200000762939, -249.5, 1.2999999523163)) { o = true; if(!open) MoveObject(gate, 67.400001525879, -249.60000610352, 1.299, 2.0); break; } } if(!o && open) MoveObject(gate, 60.200000762939, -249.5, 1.2999999523163, 2.0); return 1;}
new bool:open = false, gate, timer;forward AutoCheck();public OnFilterScriptExit(){ KillTimer(timer); DestroyObject(gate); return 1;}public AutoCheck(){ new bool:o; for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i,8.0,60.200000762939, -249.5, 1.2999999523163)) { o = true; if(!open) MoveObject(gate, 67.400001525879, -249.60000610352, 1.299, 2.0); break; } } if(!o && open) MoveObject(gate, 60.200000762939, -249.5, 1.2999999523163, 2.0); return 1;public OnGameModeInit(){ timer = SetTimer(\"AutoCheck\", 2500, 1); gate = CreateObject(983, 60.200000762939, -249.5, 1.2999999523163, 0.0000, 0.0000, 0.0000, 50.0); return 1;}
Hello!Nekem is volt ilyen frissisd az object kezelõ-det!Elvileg utána müködnie kéne.
new gate;OnGamemode....{gate=CreateDynamicObject(983, 60.200000762939, -249.5, 1.2999999523163, 0.0000, 0.0000, 0.0000, 50.0);return 1;}public OnPlayerUpdate(playerid){if(IsPlayerInRangeOfPoint(playerid,8,x,y,z kordináta)){MoveDynamicObject(gate,67.400001525879, -249.60000610352, 1.299,3);//hova menyen a kapuSetTimer(\"close\",4000,0);//becsukási idejereturn 1;} return 1;}forward close();public close(){MoveDynamicObject(gate,60.200000762939, -249.5, 1.2999999523163,3);//becsukás kordinációreturn 1;}
A modba minek van OnFilterScriptExit?
Próbáld meg így: new gate;OnGamemode....{gate=CreateDynamicObject(983, 60.200000762939, -249.5, 1.2999999523163, 0.0000, 0.0000, 0.0000, 50.0);return 1;}public OnPlayerUpdate(playerid){if(IsPlayerInRangeOfPoint(playerid,8,x,y,z kordináta)){MoveDynamicObject(gate,67.400001525879, -249.60000610352, 1.299,3);//hova menyen a kapuSetTimer(\"close\",4000,0);//becsukási idejereturn 1;} return 1;}forward close();public close(){MoveDynamicObject(gate,60.200000762939, -249.5, 1.2999999523163,3);//becsukás kordinációreturn 1;}
new gate,bool:gopend,gtimer; OnGamemode....{ gate=CreateDynamicObject(983, 60.200000762939, -249.5, 1.2999999523163, 0.0000, 0.0000, 0.0000, 50.0); gopend = false; return 1; } public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid,8,x,y,z kordináta) && gopend == false) { Killtimer(gtimer); MoveDynamicObject(gate,67.400001525879, -249.60000610352, 1.299,3);//hova menyen a kapu gtimer = SetTimer(\"close\",4000,0);//becsukási ideje gopend = true return 1; } return 1; } forward close(); public close() { MoveDynamicObject(gate,60.200000762939, -249.5, 1.2999999523163,3);//becsukás kordináció gopend = false; return 1; }