Car check +Rep if helped. - 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)
+--- Thread: Car check +Rep if helped. (
/showthread.php?tid=567634)
Car check +Rep if helped. -
MrCallum - 15.03.2015
I have made a timer to check for a car;
Код:
timer CARCheck[5000](playerid)
{
if(GetPlayerState(playerid) != 2) NOPTrigger[playerid] = 0;
new newcar = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdmin] > 1 || GetPlayerState(playerid) != 2) return 1;
else if(IsAnSASDCar(newcar) && PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1) ExecuteNOPAction(playerid);
return 1;
}
And when I compile it crashes, I take it out and compile it is fine?
Re: Car check +Rep if helped. -
ATGOggy - 15.03.2015
Try this:
PHP код:
timer CARCheck[5000](playerid)
{
if(GetPlayerState(playerid) != 2) NOPTrigger[playerid] = 0;
new newcar = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdmin] > 1 || GetPlayerState(playerid) != 2) return 1;
if(IsAnSASDCar(newcar) && PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1) ExecuteNOPAction(playerid);
return 1;
}
Re: Car check +Rep if helped. -
MrCallum - 15.03.2015
It crashes for some unknown reason.
EDIT: Right click on the image > Open in new tab.
Re: Car check +Rep if helped. -
MrCallum - 15.03.2015
Nevermind, Fixed it.
Re: Car check +Rep if helped. -
ATGOggy - 15.03.2015
Is this y_timer?