SA-MP Forums Archive
Why doesnt this work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why doesnt this work? (/showthread.php?tid=186133)



Why doesnt this work? - BigAl - 27.10.2010

public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);

if(newstate == PLAYER_STATE_DRIVER)
{
AddVehicleComponent(vehicleid, 1010);
NOS = SetTimerEx("NOSGiver", 1000, 1, "i", vehicleid);
}
else if(oldstate == PLAYER_STATE_DRIVER)
{
KillTimer(NOS);
}
return 1;
}

forward NOSGiver(vehicleid);
public NOSGiver(vehicleid)
{
AddVehicleComponent(vehicleid, 1010);
return 1;
}



it doesnt give me errors but nos doesnt work in game!
it works except its not unlimited:/


Re: Why doesnt this work? - pater - 27.10.2010

https://sampforum.blast.hk/showthread.php?tid=186132