SA-MP Forums Archive
Money at First Spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Money at First Spawn (/showthread.php?tid=397087)



Money at First Spawn - Fiore - 03.12.2012

Hello, i'm trying to set money at first spawn with something like this:

pawn Код:
public OnPlayerConnect(playerid)
{
    SetPVarInt(playerid, "FirstSpawn", 1); //The player is going to spawn for the first time
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(GetPVarInt(playerid, "FirstSpawn")) //If its the first time the player has spawned
    {
        GivePlayerMoney(playerid, 400);
        SetPVarInt(playerid, "FirstSpawn", 0);
    }
    return 1;
}
But when i log in the money loads to 400 then unloads back to 0, any suggestions?


Re: Money at First Spawn - Windrush - 03.12.2012

Maybe Your GM Have A AntiCheat


Re: Money at First Spawn - Fiore - 03.12.2012

It has it, how do i solve it?


Re: Money at First Spawn - LarzI - 03.12.2012

You probably have a function called something like "SafeGivePlayerMoney" or something - look through your anticheat code.


Re: Money at First Spawn - Windrush - 03.12.2012

What Anti-Cheat Includes Do YOu Use ?


Re: Money at First Spawn - Fiore - 03.12.2012

Solved it, thank you.


Re: Money at First Spawn - Azazelo - 03.12.2012

Look in you GM for AddPlayerMoney Or If you have command /money and it work look how work.