[PAWNO ERROR] Undefined symbol "GivePlayerCash"
#1

Hello guys, I have some errors in my gamemode, I try to put an Anti-Cheat but I delet them, now I have this errors:

Reply
#2

At the top of your script, delete the #define ResetPlayerMoney and then you need to change all of GivePlayerCash to GivePlayerMoney
Reply
#3

Quote:
Originally Posted by Sibuscus
Посмотреть сообщение
At the top of your script, delete the #define ResetPlayerMoney and then you need to change all of GivePlayerCash to GivePlayerMoney
I don't have #define ResetPlayerMoney, and 30 minutes ago GivePlayerCash works perfectly
Reply
#4

Use GivePlayerMoneyEx
PHP код:
//==============================================================================
stock GivePlayerMoneyEx(playerid,amount)
{
    
ResetPlayerMoney(playerid);
    
SetPVarInt(playerid,"cash",GetPVarInt(playerid,"cash") + amount);
    if(
GetPVarInt(playerid,"cash") > GetPVarInt(playerid,"maxcash")) SetPVarInt(playerid,"maxcash",GetPVarInt(playerid,"cash"));
    return 
GivePlayerMoney(playerid,GetPVarInt(playerid,"cash"));
}
//==============================================================================
stock SetPlayerMoneyEx(playerid,amount)
{
    
ResetPlayerMoney(playerid);
    
SetPVarInt(playerid,"cash",amount);
    if(
GetPVarInt(playerid,"cash") > GetPVarInt(playerid,"maxcash")) SetPVarInt(playerid,"maxcash",GetPVarInt(playerid,"cash"));
    return 
GivePlayerMoney(playerid,GetPVarInt(playerid,"cash"));
}
//==============================================================================
stock GetPlayerMoneyEx(playerid)return GetPVarInt(playerid,"cash");
//============================================================================== 
Reply
#5

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Use GivePlayerMoneyEx
PHP код:
//==============================================================================
stock GivePlayerMoneyEx(playerid,amount)
{
    
ResetPlayerMoney(playerid);
    
SetPVarInt(playerid,"cash",GetPVarInt(playerid,"cash") + amount);
    if(
GetPVarInt(playerid,"cash") > GetPVarInt(playerid,"maxcash")) SetPVarInt(playerid,"maxcash",GetPVarInt(playerid,"cash"));
    return 
GivePlayerMoney(playerid,GetPVarInt(playerid,"cash"));
}
//==============================================================================
stock SetPlayerMoneyEx(playerid,amount)
{
    
ResetPlayerMoney(playerid);
    
SetPVarInt(playerid,"cash",amount);
    if(
GetPVarInt(playerid,"cash") > GetPVarInt(playerid,"maxcash")) SetPVarInt(playerid,"maxcash",GetPVarInt(playerid,"cash"));
    return 
GivePlayerMoney(playerid,GetPVarInt(playerid,"cash"));
}
//==============================================================================
stock GetPlayerMoneyEx(playerid)return GetPVarInt(playerid,"cash");
//============================================================================== 
I'v solved, it was just a stock function wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)