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

Please help me.. I need this /giverespect command...
But how to make it for players?
How to make it when player write /giverespect another player see it like Player nick: Gived you a respect point..
Код:
    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[MAX_PLAYERS];
                GetPlayerName(id, victimid, sizeof(victimid));
                format(amsg,sizeof(amsg),"Player: You have given %s one respectpoint!",victimid);
                SendClientMessage(pid,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;
        }
    }
I just searched all forum and ****** and nothing.. (Sorry for my bad English)
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)