Help please
#2

This is an example.

PHP код:
CMD:givemoney(playeridparams[]) { // zcmd
    
if(PlayerInfo[playerid][pAdmin] > 1337) { // edit admin level
        
new toplayerid,
              
amount;
        if (!
sscanf(params"ui"toplayeridamount)) // sscanf
         
{
              if(
toplayerid != INVALID_PLAYER_ID && Bit1_Get(g_PlayerLoggedtoplayerid) != 0) {
                
SafeGivePlayerMoney(toplayeridamount);
                
format(globalstringsizeof(globalstring), "AdmCmd: %s has spawned %s %d$ (/givemoney)",PlayerInfo[playerid][pDisplayName] ,PlayerInfo[toplayerid][pDisplayName], amount);
                
ABroadCast(COLOR_LIGHTRED,globalstring,1);
            }
              else 
SendClientMessage(playeridCOLOR_RED"The player is not connected!");
        }
        else 
SendClientMessage(playeridCOLOR_WHITE"Usage: /givemoney <playerid> <amount>");
    }
    else 
SendClientMessage(playeridCOLOR_RED"You don't have permission to use this command!");
    return 
1;

Reply


Messages In This Thread
Help please - by Montenegrian - 17.06.2015, 16:06
Re: Help please - by GloomY - 17.06.2015, 16:11

Forum Jump:


Users browsing this thread: 1 Guest(s)