SA-MP Forums Archive
How to fix lost money $100 after death - 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: How to fix lost money $100 after death (/showthread.php?tid=460091)



How to fix lost money $100 after death - edwardluciano - 26.08.2013

?? i want to fix lost money after die $100


Re: How to fix lost money $100 after death - EiresJason - 26.08.2013

Under
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
Remove this line:
pawn Код:
GivePlayerMoney(playerid, -100);



Re: How to fix lost money $100 after death - edwardluciano - 26.08.2013

Thankyou of your answer , and i should to tell you sorry first , I want to delete lost $100 every after death out , i find in script not found onplayerdeath and more , if you know tell me again plz thankyou


Re: How to fix lost money $100 after death - edwardluciano - 26.08.2013

Thankyou for your answer , and i should to tell you sorry first , I want to delete lost $100 every after death out , i find in script not found onplayerdeath and more , if you know tell me again plz thankyou


Re: How to fix lost money $100 after death - EiresJason - 26.08.2013

Sorry, couldn't reply because the forums are really slow today.

What sort of Gamemode are you creating? Every gamemode should have a OnPlayerDeath by default.

Open the script; hit CONTROL+F then type in 'OnPlayerDeath' and it should bring you to it.

If that doesn't work; maybe attach your .pwn file and I will look through it.


Re: How to fix lost money $100 after death - Cypress - 26.08.2013

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Under
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
Remove this line:
pawn Код:
GivePlayerMoney(playerid, -100);
There is no such thing in the script. This is default. When player dies, by default he loses $100.

You have to give the money back to player when he dies so he won't lose anything in total.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     GivePlayerMoney(playerid, 100);
     return 1;
}



Re: How to fix lost money $100 after death - EiresJason - 26.08.2013

Quote:
Originally Posted by Cypress
Посмотреть сообщение
There is no such thing in the script. This is default. When player dies, by default he loses $100.

You have to give the money back to player when he dies so he won't lose anything in total.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     GivePlayerMoney(playerid, 100);
     return 1;
}
OOh lol xD

I knew it was either it was there by default or it wasn't shown and you have to refund them. Should have created a bare script before I replied xD


Re: How to fix lost money $100 after death - edwardluciano - 26.08.2013

Thankyou for all answer