27.06.2011, 15:47
Look, just remove this (you really dont need this):
And copy/paste the rest of code from:
To:
Should work! Here is my example:
Код:
else if (RELEASED(KEY_FIRE)) { if(IsPlayerInAnyVehicle(playerid)) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010); }
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
Код:
if(PRESSED(KEY_FIRE)) { for(new i = 0; i<MAX_PLAYERS; i++) { new vehicle = GetPlayerVehicleID(i); AddVehicleComponent(vehicle, 1010); } } return 1; }