08.07.2016, 22:22
PHP код:
if(strcmp(cmd,"/setlandowner",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
return 1;
}
tmp = strtok(cmdtext, land, playername);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setlandowner [landid] [name]");
return 1;
}
new string[128];
if(LandInfo[land][landCreated] == 1)
{
format(LandInfo[land][landOwner], 24, "%s", playername);
format(string, sizeof(string), "You have set land %d's owner to '%s'", land, LandInfo[land][landOwner]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s's Land (%d)", LandInfo[land][landOwner], land);
UpdateDynamic3DTextLabelText(LandInfo[land][landText], COLOR_REALRED, string);
LandInfo[land][landOwned] = 1;
}
else SendClientMessage(playerid, COLOR_GREY, "That land does not exist.");
}
Try this ?