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
#2

Maybe Your GM Have A AntiCheat
Reply
#3

It has it, how do i solve it?
Reply
#4

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

What Anti-Cheat Includes Do YOu Use ?
Reply
#6

Solved it, thank you.
Reply
#7

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


Forum Jump:


Users browsing this thread: 2 Guest(s)