CMD: to strcmp
#3

PHP код:
if(strcmp(cmd,"/setlandowner",true)==0)
{
    if(
PlayerInfo[playerid][pAdmin] >= 5)
    {
        
SendClientMessage(playeridCOLOR_GREY"You are not authorized to use this command.");
        return 
1;
    }
    
tmp strtok(cmdtextlandplayername);
    if(!
strlen(tmp))
    {
        
SendClientMessage(playeridCOLOR_WHITE"USAGE: /setlandowner [landid] [name]");
        return 
1;
    }
    new 
string[128];
    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.");


Try this ?
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)