Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

PlayerInfo Fail :(

$
0
0
Code:

CMD:givemoney(playerid, params[])
{
        new gpd, money;
        if(PlayerInfo[playerid][pAdmin] > 4 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x00FFFFFFFF, "You don't have enough permissions to use this command");
        {
            if(sscanf(params, "ri", gpd, money)) return SendClientMessage(playerid, 0x00FFFFFFFF, "SYNTAX: /givemoney (player id) (value)");
            {
                  GivePlayerMoney(gpd, money);
                  new name[MAX_PLAYERS];
                  new name2[MAX_PLAYERS];
                  new string[128];
                  new string2[129];
                  format(string, sizeof(string), "Admin %s Has Given You Money %i", GetPlayerName(playerid, name, sizeof(name)), money);
                  SendClientMessage(gpd,0x00FFFFFFFF, string);
                  format(string2, sizeof(string2), "You Have Given %s %i Money", GetPlayerName(gpd, name2, sizeof(name2)), money);
                  SendClientMessage(playerid,0x00FFFFFFFF, string2);
                }
        }
        return 1;
}

I Have These code, but when i type it /givemoney, it just says i don't have permissions on Return SendClientMessage, but when i checked my PlayerInfo, it has 4(which means working fine)
please help me someone :(

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>