All pastes #522778 Raw Edit

sa-mp script

public text v1 · immutable
#522778 ·published 2007-05-30 15:08 UTC
rendered paste body
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid;
if(newstate == PLAYER_STATE_DRIVER)
{
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == 1)
{// It's the objective vehicle
taxidriver[playerid] = 1;
GameTextForPlayer(playerid,"~y~This is a taxi vehicle~n~~r~type /exit or /accept",5000,5);
TogglePlayerControllable(playerid,0);
}
}
else
{
taxidriver[playerid] = 0;
}
//====[derby]===================================================================
{
if(derby[playerid] == 1){
{
derby[playerid] = 2;
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid,COLOR_YELLOW,"You frozen to the timer is 0");
}
}
}
if(newstate == PLAYER_STATE_ONFOOT)
{
if(derby(playerid) == 2)   //line 1538
{
derby[playerid] = 0;
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,COLOR_YELLOW,"You lose the derby");
}
}
return 1;
}