if player wantedlevel ?
#1

i want add to this command if player 10 wanted stars cant /rob

PHP код:
CMD:rob(playeridparams[])
{
    
#pragma unused params // we dont need the params
    
if(IsPlayerInDynamicCP(playeridCP_tatoo)) // Checking if player is in the checkpoint
    
{
        if(
tatoorobbedrecently >=1//checking if tatoo shop has been robbed recently
        
{
    
SendClientMessage(playeridCOLOR_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(playeridCOLOR_RED"ERROR:You need to be near shop!"); // Sends a SCM Your not on a Checkpoint.
    
}
    return 
1;

Reply
#2

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;
}
Reply
#3

xVIP3Rx thank you +1
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)