command help
#1

How i can make a command that would set a pDgun variable to a player with this syntax:
/givepdgun [playerid/PartOfName] [rank] (rank is a number)
Reply
#2

What?
Please be more specific..And this is not a script request section.
Reply
#3

pawn Код:
if(strcmp(cmd, "/givedgun", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp));
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givedgun [playerid/PartOfName] [rank]");
                return 1;
            }
            new amount;
            amount = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1339)
            {
                PlayerInfo[giveplayerid][pDgun] = amount;
                format(string, sizeof(string), "   The Player Was Set To %d DG Rank", amount);
                GetPlayerName(playur, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, 256, "News: %s has set %s's dgrank to %d.", sendername,giveplayer,amount);
                ABroadCast(COLOR_YELLOW,string,1);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
            }
        }
    }
Will this work ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)