problem with a givecash limit on death
#1

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!
Reply
#2

if (PlayerMoney < 100000)[size=16pt]; << remove semi-colon
{
GivePlayerMoney(killerid, 100000);
}[/size]
Reply
#3

yes it worked, thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)