onplayerspawn problem
#1

hee all,

i got a problem wich involves onplayerspawn,

everytime i type /kill and spawn, i lose $100 at spawn
while i'm pretty sure there's nothing there like GivePlayerMoney(playerid, -100);

anyone got an idea?

thanks in advance,

Jop9888
Reply
#2

Don't you have any variable that is activated when you die and give you money with that variable?
Example:
pawn Код:
// OnPlayerDeath:

Variable[playerid] -= 1000;

// OnPlayerSpawn:

GivePlayerMoney(playerid, Variable[playerid]);
Reply
#3

It's default to lose $100 every time a player dies if you don't have any code that counters it under OnPlayerDeath
Best thing to do is to get the player's money and set it to that amount.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new pmoney = GetPlayerMoney(playerid);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, pmoney);
    return 1;
}
Reply
#4

No is not ¬¬
I don't have this problem.
Reply
#5

Well, I've had it too and it seemed like it's default. Maybe you don't have it since you're already taking away from a player's money when they die.
Reply
#6

Tincho you don't have the problem because you probably have an anti-money hack which will automatically set the money to the correct one because the -$100 is a server side issue. These who have played the singleplayer game will see how they will lose $100 when they are sent to hospital, well the same happens here, it's a thing hardcoded into San Andreas.
Reply
#7

Quote:
Originally Posted by admantis
Посмотреть сообщение
Tincho you don't have the problem because you probably have an anti-money hack which will automatically set the money to the correct one because the -$100 is a server side issue. These who have played the singleplayer game will see how they will lose $100 when they are sent to hospital, well the same happens here, it's a thing hardcoded into San Andreas.
Okay, but I don't have an anti-money hack which set the money correctly :S (yes, I have on my server but not happend this).
Reply
#8

i'm sure that NEVER in my script i take $100 from a player, and indeed it only happens when a player spawn after death, i'll try your idea scribbels, thanks for the help all!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)