#1

Hi,

Is there any way to make command that when i type /rewardadmins it will only give cash to player who are admin not regular player + REP
Reply
#2

PHP код:
CMD:rewardadmins(playeridparams[])
{
    static 
reward,str[60],name[24];
    if(
sscanf(params,"d",reward)) return SendClientMessage(playerid,-1,"USAGE: /rewardadmins (reward amount)");
    if(!
pInfo[playerid][pAdmin]) return SendClientMessage(playerid,-1,"You're not an admin."); // Change pInfo[playerid][pAdmin] to your admin variables.
    
GetPlayerName(playerid,name,sizeof(name));
    
format(str,sizeof(str),"%s has rewarded all admins with $%d",name,reward);
    for(new 
0GetPlayerPoolSize(); <= ji++) if(pInfo[playerid][pAdmin])
    {
        
GivePlayerMoney(i,reward);
        
SendClientMessage(i,-1,str);
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)