SA-MP Forums Archive
Need Help with Anti Spawn Kill - 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: Need Help with Anti Spawn Kill (/showthread.php?tid=260759)



Need Help with Anti Spawn Kill - SpiderWalk - 10.06.2011

Hello i make my Anti Spawn Kill but i have 2 errors and i dont know how to fix it please help me
errors
Код:
C:\Documents and Settings\Korisnik\Desktop\Mini Games Server\filterscripts\AntiSpawnKill.pwn(70) : error 055: start of function body without function header
C:\Documents and Settings\Korisnik\Desktop\Mini Games Server\filterscripts\AntiSpawnKill.pwn(72) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
http://pastebin.com/kB157Ezx
here are codes


Re: Need Help with Anti Spawn Kill - Sascha - 10.06.2011

change
pawn Код:
public AntiSK();
to
pawn Код:
public AntiSK()

--This forum requires that you wait 120 seconds between posts. Please try again in 37 seconds. << waste of time..


Re: Need Help with Anti Spawn Kill - SpiderWalk - 10.06.2011

aha thank you and what with this error
Код:
C:\Documents and Settings\Korisnik\Desktop\Mini Games Server\filterscripts\AntiSpawnKill.pwn(71) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Need Help with Anti Spawn Kill - SpiderWalk - 10.06.2011

to delete playerid or what to do?


Re: Need Help with Anti Spawn Kill - Sascha - 10.06.2011

replace it with this:
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i))
  {
    SetPlayerHealth(i,INFINITY);
  }
}
return 1;
or add a (playerid) parameter to the function (forward AntiSk(playerid); public AntiSk(playerid) ....), however then you'll also have to use a "SetTimerEx("AntiSk", 15000, true, "i", playerid);" which is not compatible with the OnGameModeInit callback


Re: Need Help with Anti Spawn Kill - SpiderWalk - 10.06.2011

hmm everything are working but.When i enter to game its works and for 15secs i die i dont know why how to set it to dont die?


Re: Need Help with Anti Spawn Kill - SpiderWalk - 10.06.2011

Need to set it to 1000 or not?


Re: Need Help with Anti Spawn Kill - SpiderWalk - 10.06.2011

Need help!


Re: Need Help with Anti Spawn Kill - Sascha - 10.06.2011

yea set the infinity variable lower...
like 9999 or so.. if you put it too high it kills the player

ps: don't spam


Re: Need Help with Anti Spawn Kill - DRIFT_HUNTER - 10.06.2011

Simple and optimized
pawn Код:
forward GodModOFF(playerid);

public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid,999999);
    SetTimerEx("GodModOFF",5000,false,"%d",playerid);
    return 1;
}

public GodModOFF(playerid)
{
    SetPlayerHealth(playerid,100);
    return 1;
}