Command Problem
#1

It says SERVER: Unknown Command

When i try without cost and inter the sscanf responds.

Код:
if(IsStringSame(cmdtext,CHouseCommand))
	{
		if(!IsPlayerAdmin(playerid))
		{
			SendClientMessage(playerid,HCOLOR_ERROR,MSGAccess);
		}
		
		new string[256];
		new Cost;
		new Inter;
		
        if(sscanf(cmdtext,"dd",Cost,Inter))
	    {
            format(string,sizeof(string),"%s (Price) (Interior)",CHouseCommand);
            SendClientMessage(playerid,HCOLOR_ERROR,string);
		    return 1;
	    }
	    if(Cost < 0)
	    {
            SendClientMessage(playerid,HCOLOR_ERROR,MSGHPrice);
		    return 1;
	    }
	    if(Inter <= 0 || Inter > 10)
	    {
            SendClientMessage(playerid,HCOLOR_ERROR,MSGHInteriors);
		    return 1;
	    }
	    CreateHouse(playerid,Cost,Inter);
	    format(string,sizeof(string),"You have succerfully created a new house. Price: $%d. Interior: %d",Cost,Inter);
	    SendClientMessage(playerid,HCOLOR_WHITE,string);
		return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)