[CODE] on death - help please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [CODE] on death - help please (
/showthread.php?tid=332726)
[CODE] on death - help please -
squomp - 09.04.2012
when a player in my server dies they lose $100 but i havent scripted this, however if there money is below 0 then it dosnt take away $100, this is screwing with my anit money cheat, is there any way to stop this.
Re: [CODE] on death - help please -
Reklez - 09.04.2012
Do you have GivePlayerMoney code onplayerdeath or do you have filterscript that makes your money lose OnPlayerDeath
Re: [CODE] on death - help please -
squomp - 09.04.2012
no I do not
Re: [CODE] on death - help please -
Shabi RoxX - 09.04.2012
Show us codes so I can see the problem.. OnPlayerDeath...
Re: [CODE] on death - help please -
squomp - 09.04.2012
public OnPlayerDeath(playerid, killerid, reason)
{
new deathskin[MAX_PLAYERS];
deathskin[playerid] = GetPlayerSkin(playerid);
dini_IntSet(file, "DeathPlayerSkin", deathskin[playerid]);
return 1;
}
Re: [CODE] on death - help please -
Cjgogo - 09.04.2012
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new deathskin[MAX_PLAYERS];
deathskin[playerid] = GetPlayerSkin(playerid);
dini_IntSet(file, "DeathPlayerSkin", deathskin[playerid]);
if(GetPlayerMoney(playerid)!=0) GivePlayerMoney(playerid,-100);
money[playerid]=GetPlayerMoney(playerid);
dini_IntSet(file,"PlayerMoney",money[playerid]);
return 1;
}
Re: [CODE] on death - help please -
Jack Shred - 09.04.2012
Guys, GTA San Andreas automatically takes $100 on death, just add GivePlayerMoney(playerid, 100); @ OnPlayerDeath and you're fine
Re: [CODE] on death - help please -
squomp - 09.04.2012
okay cool thanks