Please help me with this command.. :)
#5

Thanks for using my code.

pawn Код:
if(strcmp("/giverespect", cmd, true) == 0)
    {
        if(PlayerInfo[playerid][pAdminLevel] == 3)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /giverespect [id]");
            }
            new id = strval(tmp);
            new pid = playerid;
            if(!IsPlayerConnected(id))
            {
                return SendClientMessage(playerid,COLOR_GRAY,"Player: This player is not online!");
            }
            if (PlayerInfo[id][pPermissons] < 200)
            {
                new amsg[100];
                new victimid[28];
                new adminid[28];
                GetPlayerName(id, victimid, sizeof(victimid));
                GetPlayerName(pid, adminid, sizeof(adminid));
                format(amsg,sizeof(amsg),"Player: You have given %s one respectpoint!",victimid);
                SendClientMessage(pid,COLOR_LIGHTBLUE,amsg);
                format(amsg,sizeof(amsg),"Player: Admin %s has given you one respectpoint!",adminid);
SendClientMessage(id,COLOR_LIGHTBLUE,amsg);
                PlayerInfo[id][pPermissons]++;
                PlayHintSoundAtPos(playerid);
                return 1;
            }
            else SendClientMessage(pid,COLOR_GRAY,"Player: This player already haves too many respect (over 200)!");
        }
        else
        {
            SendClientMessage(playerid,COLOR_GRAY,"You don't have authorization.");
            return 1;
        }
    }
Edited.
Reply


Messages In This Thread
Please help me with this command.. :) - by trapped1 - 18.01.2011, 12:41
Re: Please help me with this command.. :) - by trapped1 - 18.01.2011, 13:13
Re: Please help me with this command.. :) - by Johndaonee - 18.01.2011, 13:23
Re: Please help me with this command.. :) - by trapped1 - 18.01.2011, 13:41
Re: Please help me with this command.. :) - by admantis - 18.01.2011, 14:34
Re: Please help me with this command.. :) - by trapped1 - 18.01.2011, 14:58

Forum Jump:


Users browsing this thread: 6 Guest(s)