CMD: to strcmp
#2

Hello!

Try this:
PHP код:
if(!strcmp(cmdtext,"/setlandowner",true))
{
    if(
PlayerInfo[playerid][pAdmin] >= 5)
    {
        new 
landplayername[24], string[128];
        if(
sscanf(cmdtext"ds[24]"landplayername)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /setlandowner [landid] [name]");
        if(
LandInfo[land][landCreated] == 1)
        {
            
format(LandInfo[land][landOwner], 24"%s"playername);
            
format(stringsizeof(string), "You have set land %d's owner to '%s'"landLandInfo[land][landOwner]);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
format(stringsizeof(string), "%s's Land (%d)"LandInfo[land][landOwner], land);
            
UpdateDynamic3DTextLabelText(LandInfo[land][landText], COLOR_REALREDstring);
            
LandInfo[land][landOwned] = 1;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"That land does not exist.");
        }
    }
    return 
1;

Reply


Messages In This Thread
CMD: to strcmp - by MayaEU - 08.07.2016, 22:08
Re: CMD: to strcmp - by Mencent - 08.07.2016, 22:12
Re: CMD: to strcmp - by Napst34 - 08.07.2016, 22:22
Re: CMD: to strcmp - by PrO.GameR - 08.07.2016, 23:59

Forum Jump:


Users browsing this thread: 1 Guest(s)