Admin Title Command
#8

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
That wont work, these will be invalid:
pawn Код:
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.");
And again:


It should be like this:
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(sscanf(params, "us[32]", userid, atitle))
        return SendSyntaxMessage(playerid, "/admintitle [ID/Name] [Title]");

    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;
}
I see what you mean now, I will give it a try
Reply


Messages In This Thread
Admin Title Command - by Luke_James - 18.02.2015, 14:25
Re: Admin Title Command - by HazardouS - 18.02.2015, 14:32
Re: Admin Title Command - by Luke_James - 18.02.2015, 14:59
Re: Admin Title Command - by HazardouS - 18.02.2015, 15:05
Re: Admin Title Command - by CalvinC - 18.02.2015, 15:06
Re: Admin Title Command - by Luke_James - 18.02.2015, 17:52
Re: Admin Title Command - by CalvinC - 18.02.2015, 18:05
Re: Admin Title Command - by Luke_James - 18.02.2015, 18:11

Forum Jump:


Users browsing this thread: 4 Guest(s)