[HELP]Problems with death money
#1

Hey any one can help me?... when i death... my money is -100.. for example i have 1500 when i death now its 1400 and if i death again.. its 1300...

I dont understand becausee here is my onplayerdeath line:

Код:
public OnPlayerDeath(playerid, killerid)
{
	return 1;
}
and when i enter on a taxi car my money is +12 .. i haveee 500 and if i enter the taxi know is 512... please help me!
Reply
#2

Maybe OnPlayerSpawn ?
Reply
#3

No men :S in any place appears giveplayermoney -12 or something like that
Reply
#4

public OnPlayerDeath(playerid, killerid)
{
GivePlayerMoney(playerid, GetPlayerMoney(playerid) -100);
return 1;
}
Reply
#5

Quote:
Originally Posted by actiwe
public OnPlayerDeath(playerid, killerid)
{
GivePlayerMoney(playerid, GetPlayerMoney(playerid) -100);
return 1;
}
i use that but i dont know whyy when i dead its -100 of money.. but thanks
Reply
#6

Код:
public OnPlayerDeath(playerid, killerid)
{
if(GetPlayerMoney(playerid) => 100)
{
GivePlayerMoney(playerid, GetPlayerMoney(playerid) -100);
}
else
{
new Money = GetPlayerMoney(playerid);
GivePlayerMoney(playerid, -Money);
SendClientMessage(playerid, 0xF60000AA, "You donґt have money enough so we removed all money you have...");
}
return 1;
}
i think this one is better :P

and fixed the problem
Reply
#7

pawn Код:
public OnPlayerDeath(playerid, killerid)
{
   GivePlayerMoney(playerid, 100);
   GivePlayerMoney(playerid, GetPlayerMoney(playerid) -100);
   return 1;
}
Reply
#8

Quote:
Originally Posted by DarK_TeaM PT
Код:
public OnPlayerDeath(playerid, killerid)
{
if(GetPlayerMoney(playerid) => 100)
{
GivePlayerMoney(playerid, GetPlayerMoney(playerid) -100);
}
else
{
new Money = GetPlayerMoney(playerid);
GivePlayerMoney(playerid, -Money);
SendClientMessage(playerid, 0xF60000AA, "You donґt have money enough so we removed all money you have...");
}
return 1;
}
i think this one is better :P

and fixed the problem
look at mine and

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
public OnPlayerDeath(playerid, killerid)
{
   GivePlayerMoney(playerid, 100);
   GivePlayerMoney(playerid, GetPlayerMoney(playerid) -100);
   return 1;
}
it is going only to give him 100 and remove 100?
Reply
#9

Zafire2008..by any chance do use mysql?.. Because i remember that one mysql plugin would have a money bug..and would do the exact same thing.
Reply
#10

Quote:
Originally Posted by Killaz/s0nic
Zafire2008..by any chance do use mysql?.. Because i remember that one mysql plugin would have a money bug..and would do the exact same thing.
yes i use mysql brro :S .. i have

* SA:MP - MySQL Native Functions
* © Copyright 2008-2009, G-sTyLeZzZ
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)