problem with a givecash limit on 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problem with a givecash limit on death (
/showthread.php?tid=145487)
problem with a givecash limit on death -
pmk1 - 02.05.2010
hey guys
i was trying to make a givecash limit when a player gets killed, so if someone has more than 100 000$ in their pockets well only 100 000$ are given to the killer. Example:
I have 2 345 678$ and someone kills me. The guy only receives 100 000$.
But then i get 1 error in my script, i tried something like that:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new PlayerMoney;
PlayerMoney = GetPlayerMoney(playerid);
if (PlayerMoney < 100000);
{
GivePlayerMoney(killerid, 100000);
}
im not even sure it works, but here is the error:
Код:
C:\Program Files (x86)\Rockstar games\Gta San Andreas\dedicated server\gamemodes\pmkfunserver.pwn(638) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
what means this error and how can it be fixed?
thanks!
Re: problem with a givecash limit on death -
M4S7ERMIND - 02.05.2010
if (PlayerMoney < 100000)[size=16pt]; << remove semi-colon
{
GivePlayerMoney(killerid, 100000);
}[/size]
Re: problem with a givecash limit on death -
pmk1 - 02.05.2010
yes it worked, thanks