06.07.2012, 19:16
In my gamemode:
In my filterscript:
The problem is, is that every time this function is called, it always does success = 0 which means its not workin. Anyone know how i can fix this?
Код:
forward Admin_GetPlayerMoney(playerid);
public Admin_GetPlayerMoney(playerid)
{
return APlayerData[playerid][PlayerMoney];
}
Код:
// This function is used to set the player's money
INT_GivePlayerMoney(playerid, Money)
{
// Setup local variables
new Success;
// Try to call the external function to get the player's money (used to get the serversided money for this player)
Success = CallRemoteFunction("Admin_GivePlayerMoney", "ii", playerid, Money);
// The external function returned "0" as the function is not used in another script
if (Success == 0)
{
GivePlayerMoney(playerid, Money); // Use the normal money (client-sided money)
SendClientMessage(playerid, 0xFFFFFFFF, "The money system didnt work correctly. Please contact an admin IMMEDIATLY");
}
}

