08.07.2016, 22:08
How to make this command into strcmp?
pawn Код:
CMD:setlandowner(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
new land, playername[24], string[128];
if(sscanf(params, "ds[24]", land, playername)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setlandowner [landid] [name]");
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.");
}
}
return 1;
}