if player wantedlevel ? - 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: if player wantedlevel ? (
/showthread.php?tid=562960)
if player wantedlevel ? -
s3ek - 12.02.2015
i want add to this command if player 10 wanted stars cant /rob
PHP код:
CMD:rob(playerid, params[])
{
#pragma unused params // we dont need the params
if(IsPlayerInDynamicCP(playerid, CP_tatoo)) // Checking if player is in the checkpoint
{
if(tatoorobbedrecently >=1) //checking if tatoo shop has been robbed recently
{
SendClientMessage(playerid, COLOR_RED, "The shop has been robbed recenty. Please wait"); // sending error message
return 1;
}
ROBBING_TATOO[playerid] = 5; // setting the robbery timer
tatoorobbedrecently =20; // Time the players needs to wait for starting an another robbery in the same place
}
else {
SendClientMessage(playerid, COLOR_RED, "ERROR:You need to be near shop!"); // Sends a SCM Your not on a Checkpoint.
}
return 1;
}
Re: if player wantedlevel ? -
xVIP3Rx - 12.02.2015
Use
GetPlayerWantedLevel
pawn Код:
CMD:rob(playerid, params[])
{
#pragma unused params
if( !IsPlayerInDynamicCP(playerid, CP_tatoo )) return SendClientMessage(playerid, COLOR_RED, "ERROR:You need to be near shop!");
if( tatoorobbedrecently ) return SendClientMessage(playerid, COLOR_RED, "The shop has been robbed recenty. Please wait");
if( GetPlayerWantedLevel(playerid) >= 10 ) return SendClientMessage(playerid, COLOR_RED, "You can't rob this shop");
ROBBING_TATOO[playerid] = 5;
tatoorobbedrecently = 20;
return 1;
}
Re: if player wantedlevel ? -
s3ek - 12.02.2015
xVIP3Rx thank you +1