03.12.2012, 09:03
Hello, i'm trying to set money at first spawn with something like this:
But when i log in the money loads to 400 then unloads back to 0, any suggestions?
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;
}