Gamemode: Money Bug/Error
#3

well

PHP код:
if(strcmp(cmd"/givecash"true) == 0)
{
    if(
IsPlayerConnected(playerid))
    {
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp))
        {
            
SendClientMessage(playeridCOLOR_GREY"USAGE: /givecash [player id/name] [money]");
            return 
1;
        }
        new 
playa;
        new 
money;
        
playa ReturnUser(tmp);
        
tmp strtok(cmdtextidx);
        
money strval(tmp);
        if (
PlayerInfo[playerid][pAdmin] >= 5)
        {
             if(
IsPlayerConnected(playa))
               {
                 if(
playa != INVALID_PLAYER_ID)
                   {
                     
GetPlayerName(playagiveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
ConsumingMoney[playa] = 1;
                    
GivePlayerMoney(playamoney);
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"You are not a admin!");
        }
    }
    return 
1;

Reply


Messages In This Thread
Gamemode: Money Bug/Error - by Zmith - 15.06.2014, 09:06
Re: Gamemode: Money Bug/Error - by RenovanZ - 15.06.2014, 09:29
Re: Gamemode: Money Bug/Error - by Lacamora - 15.06.2014, 09:35
Re: Gamemode: Money Bug/Error - by Le3aT - 15.06.2014, 11:59
Re: Gamemode: Money Bug/Error - by Zmith - 15.06.2014, 15:27

Forum Jump:


Users browsing this thread: 1 Guest(s)