Commands
#4

You're setting [playerid] to get the donator level, not the ID

pawn Код:
CMD:setdonator(playerid, params[])
{
    new id, string[256];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid,RED,"[USAGE]: /setdonator [name/id]");
    if(PlayerInfo[playerid][pAdmin] < 3) return 0;
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, RED, "Player not found.");
    {
        format(string, sizeof(string), "{009BFF}You have give %s (%d) Donator Player level", GetName(id), id);
        SendClientMessage(playerid, GREEN, string);
        PlayerInfo[id][pDonator] = 1; //This was most likely the problem.
    }
    return true;
}
Reply


Messages In This Thread
Commands - by ALoX12 - 07.07.2015, 18:31
Re: Commands - by arlindi - 07.07.2015, 18:39
Re: Commands - by ALoX12 - 07.07.2015, 19:02
Re: Commands - by DTV - 07.07.2015, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)