[HELP] Need to set limit on this CMD
#1

Hi I need to make this command to not to add more than 1m if someone try to enter a value above 1million it says you cant enter that much ammount the limit is 1m

PHP код:
YCMD:setcontract(playeridparams[], help) { 
    new 
userprice
    new 
faction GetPVarInt(playerid"Faction"); 
    if(
getFactionType(faction) != EFactionType_Hitman || GetPVarInt(playerid"Rank") < 2) { 
        
SendClientMessage(playeridX11_TOMATO_2"You aren't a member of hitman!"); 
        return 
1
    } 
    if(!
sscanf(params"k<playerLookup>d",user,price)) { 
        if(!
IsPlayerConnectEx(user)) { 
            
SendClientMessage(playeridX11_TOMATO_2"User not found"); 
            return 
1
        } 
        
SetPVarInt(user"Contract"price); 
        if(
price != 0) { 
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* Contract Updated!"); 
        } else { 
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* Contract Removed!"); 
        } 
    } else { 
        
SendClientMessage(playeridX11_WHITE"USAGE: /setcontract [user] [price]"); 
    } 
    return 
1

Reply


Messages In This Thread
[HELP] Need to set limit on this CMD - by Puff - 12.12.2014, 11:09
Re: [HELP] Need to set limit on this CMD - by PowerPC603 - 12.12.2014, 11:11
Re: [HELP] Need to set limit on this CMD - by Puff - 12.12.2014, 11:16

Forum Jump:


Users browsing this thread: 1 Guest(s)