13.05.2009, 19:16
hi guys, im trying to script an anit-bike fall off. but i have a problem my script seems te run perfect when only 1 player is on the server but when 2 players are on the last joined player is able to make full use of the anti-bike fall off and player id 0 starts bugging. does anyone know why?
Код:
public OnPlayerEnterVehicle(playerid, vehicleid) { BikeTimer = SetTimerEx("AntiF",1000,1,"i",playerid); BikeVid[playerid]=vehicleid; return 1; } public AntiF(playerid) { PutPlayerInVehicle(playerid,BikeVid[playerid],0); return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == 16) { if(IsPlayerInAnyVehicle(playerid)) { KillTimer(BikeTimer); RemovePlayerFromVehicle(playerid); } } return 1; }