addcash
#7

Quote:
Originally Posted by doreto
Посмотреть сообщение
I used search!

Quote:
Originally Posted by Amel_PAtomAXx
Посмотреть сообщение
first define COLOR_GREEN , COLOR_GREY and COLOR_ORANGE

pawn Код:
if(strcmp(cmd, "/setmoney", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GREY, "USAGE: /setmoney [playerid/PartOfName] [Ammount]");
                return 1;
            }
            new giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME],string[128],string2[128];
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(IsPlayerAdmin(playerid)) // here put your admin system
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        ResetPlayerMoney(para1);
                        GivePlayerMoney(para1,level);
                        format(string, sizeof(string), " Admin %s has set your money to %d .",sendername,level);
                        SendClientMessage(para1, COLOR_GREEN, string);
                        format(string2, sizeof(string2), "You have set %s's money to %d.", giveplayer,level);
                        SendClientMessage(playerid, COLOR_ORANGE, string2);

                    }
                }
                else
                {
                    SendClientMessage(playerid,COLOR_GREY,"Player not Connected");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
            }
        }
        return 1;
    }
Issn't it easier with DCMD? (Im using dcmd)
Reply


Messages In This Thread
addcash - by BloodGod - 02.09.2011, 11:02
Re: addcash - by doreto - 02.09.2011, 11:13
Re: addcash - by Davz*|*Criss - 02.09.2011, 11:20
Re: addcash - by Amel_PAtomAXx - 02.09.2011, 11:25
Re: addcash - by Davz*|*Criss - 02.09.2011, 11:31
Re: addcash - by Amel_PAtomAXx - 02.09.2011, 11:32
Re: addcash - by BloodGod - 02.09.2011, 11:32
Re: addcash - by Davz*|*Criss - 02.09.2011, 11:42
Re: addcash - by BloodGod - 02.09.2011, 11:54
Re: addcash - by Kingunit - 02.09.2011, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)