COmmands
#1

PHP код:
CMD:chouse(playeridparams[])
{
        new 
tmp[256];
        new 
cmd[256+1];
        new 
idx;
        
cmd strtok(cmdtextidx);
        
tmp strtok(cmdtext,idx);
        new 
tmp2[256];
        
tmp2 strtok(cmdtext,idx);
        if(!
strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid,-1,"Use: /chouse [price] [intid]");
        new 
id strval(tmp2);
        new 
Price strval(tmp);
        if(
Price <= 0)
        return 
SendClientMessage(playerid,-1,"Invalid house price. The house price must be between $"#MIN_HOUSE_PRICE" and $"#MAX_HOUSE_PRICE"");
        
CreateHouse(playerid,GetFreeHouseID(),Price,id);
        
SendClientMessage(playerid,-1,"House Created");
        return 
1;

someone please convert this into sscanf zcmd
Reply


Messages In This Thread
COmmands - by ALoX12 - 14.07.2015, 18:13
Re: COmmands - by kloning1 - 14.07.2015, 18:16
Re: COmmands - by ALoX12 - 14.07.2015, 18:20
Re: COmmands - by kloning1 - 14.07.2015, 18:27
Re: COmmands - by ALoX12 - 14.07.2015, 18:37
Re: COmmands - by ALoX12 - 14.07.2015, 21:18

Forum Jump:


Users browsing this thread: 1 Guest(s)