Help please thanks.
#5

Quote:
Originally Posted by Zedder
Посмотреть сообщение
PHP код:
YCMD:pay(playeridparams[], help) { 
    new 
playamoneystring[128]; 
    if(
help) { 
        
SendClientMessage(playeridX11_WHITE"Gives a player money"); 
        return 
1
    } 
    if(!
sscanf(params"k<playerLookup>d"playamoney)) { 
        if(!
IsPlayerConnectEx(playa)) { 
            
SendClientMessage(playeridX11_RED_2"User not found!"); 
            return 
1
        } 
        if(
playa == playerid) { 
            
SendClientMessage(playeridX11_WHITE"You cannot give money to yourself"); 
            return 
1
        } 
        if(
GetPVarInt(playerid"ConnectTime" 25) &&  money 1000) { //changes has been made here
            
SendClientMessage(playeridX11_TOMATO_2"You must be over 25 connect time to do this!"); 
            return 
1
        } 
        if(
money || money >= 5000000) { 
            
SendClientMessage(playeridX11_WHITE"Invalid Amount"); 
            return 
1
        } 
        if(
GetMoneyEx(playerid) < money) { 
            
SendClientMessage(playeridX11_RED_2"You do not have enough money"); 
            return 
1
        } 
        new 
Float:X,Float:Y,Float:Z
        
GetPlayerPos(playaXYZ); 
        if(!
IsPlayerInRangeOfPoint(playerid,5.0,XYZ)) { 
            
SendClientMessage(playeridX11_TOMATO_2"You are not near this player"); 
            return 
1
        } 
        
format(stringsizeof(string), "* You gave $%s to %s."getNumberString(money), GetPlayerNameEx(playaENameType_RPName)); 
        
SendClientMessage(playeridCOLOR_LIGHTGREENstring); 
        
format(stringsizeof(string), "* You have received $%s from %s."getNumberString(money), GetPlayerNameEx(playeridENameType_RPName)); 
        
SendClientMessage(playaCOLOR_LIGHTGREENstring); 
        
format(stringsizeof(string), "* %s takes out some cash, and hands it to %s."GetPlayerNameEx(playeridENameType_RPName) ,GetPlayerNameEx(playaENameType_RPName)); 
        
ProxMessage(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
        
SetPlayerChatBubble(playeridstringCOLOR_PURPLE3.05000); 
        
format(stringsizeof(string), "%s pays %s %d",GetPlayerNameEx(playeridENameType_CharName), GetPlayerNameEx(playeridENameType_CharName), money); 
        
payLog(string); 
        if(
money 19999 && GetPVarInt(playerid"ConnectTime") < 50 || money 49999
        { 
            
format(stringsizeof(string), "Possible Money Farming: %s has paid $%s to %s."GetPlayerNameEx(playeridENameType_CharName), getNumberString(money), GetPlayerNameEx(playaENameType_CharName)); 
            
ABroadcast(COLOR_YELLOW,stringEAdminFlags_BasicAdmin); 
        } 
        
GiveMoneyEx(playerid, -money); 
        
GiveMoneyEx(playamoney); 
    } else { 
        
SendClientMessage(playeridX11_WHITE"USAGE: /pay [playerid/name] [amount]"); 
    } 
    return 
1

+REP thank you.
Reply


Messages In This Thread
Help please thanks. - by Puff - 23.09.2017, 11:19
Re: Help please thanks. - by Kinta - 23.09.2017, 11:24
Re: Help please thanks. - by Zedder - 23.09.2017, 11:34
Re: Help please thanks. - by Puff - 23.09.2017, 11:54
Re: Help please thanks. - by Puff - 23.09.2017, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)