18.02.2015, 14:25
This command is meant to set an admin's title and save it to the database, but it doesn't work. I can set the title via the database manually and it loads it fine, but when I use the /admintitle command it resets the title of the person executing the command and doesn't update the title.
pawn Код:
CMD:admintitle(playerid, params[])
{
static
atitle[32],
userid;
if(PlayerData[playerid][pAdmin] < 6)
return SendErrorMessage(playerid, "You don't have permission to use this command.");
if (userid == INVALID_PLAYER_ID)
return SendErrorMessage(playerid, "You have specified an invalid player.");
if(PlayerData[userid][pAdmin] < 1)
return SendErrorMessage(playerid, "This player is not an administrator.");
format(PlayerData[userid][pAdminTitle], 32, atitle);
return 1;
}