Money at First Spawn
#1

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?
Reply


Messages In This Thread
Money at First Spawn - by Fiore - 03.12.2012, 09:03
Re: Money at First Spawn - by Windrush - 03.12.2012, 09:08
Re: Money at First Spawn - by Fiore - 03.12.2012, 09:09
Re: Money at First Spawn - by LarzI - 03.12.2012, 09:12
Re: Money at First Spawn - by Windrush - 03.12.2012, 09:12
Re: Money at First Spawn - by Fiore - 03.12.2012, 09:12
Re: Money at First Spawn - by Azazelo - 03.12.2012, 09:12

Forum Jump:


Users browsing this thread: 2 Guest(s)