SA-MP Forums Archive
Someone help me to fix my anti airbreak? - 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: Someone help me to fix my anti airbreak? (/showthread.php?tid=600580)



Someone help me to fix my anti airbreak? - pedrotvr - 09.02.2016

warning 202: number of arguments does not match definition
if(GetPlayerPos(playerid) >= x, y, 200 && GetPlayerSpeed(playerid, true) == 0) {

code
Код:
	KillTimer(timerAtualizarPlayer[playerid]);
	timerAtualizarPlayer[playerid] = SetTimerEx("AtualizarPlayer", 500, true, "i", playerid);
AtualizarPlayer(playerid) {
Код:
	// anti airbreak
	new Float:x,Float:y,Float:z;
	GetPlayerPos(playerid, x, y, z);
	if(GetPlayerPos(playerid) >= x, y, 200 && GetPlayerSpeed(playerid, true) == 0) {
		format(string, sizeof(string), "ANTICHEAT: %s foi detectado por: AIRBREAK", PlayerName(playerid) );
		ABroadCast(COLOR_LIGHTGREEN,string,3);
	}



Re: Someone help me to fix my anti airbreak? - GangstaSunny - 10.02.2016

PHP код:
if(GetPlayerPos(playerid) >= xy200 && GetPlayerSpeed(playeridtrue) == 0
to

PHP код:
if(>= 200 && GetPlayerSpeed(playeridtrue) == 0
The variable "z" already stores the high of the player. GetPlayerPos(...) will only store the floatvalue in some variables and do not return it.


Re: Someone help me to fix my anti airbreak? - luccagomes15 - 10.02.2016

Quote:
Originally Posted by GangstaSunny
Посмотреть сообщение
PHP код:
if(GetPlayerPos(playerid) >= xy200 && GetPlayerSpeed(playeridtrue) == 0
to

PHP код:
if(>= 200 && GetPlayerSpeed(playeridtrue) == 0
The variable "z" already stores the high of the player. GetPlayerPos(...) will only store the floatvalue in some variables and do not return it.
stoped on a big montain = airbreak detected...
Right?


Re: Someone help me to fix my anti airbreak? - itsCody - 10.02.2016

What if he's falling through the air from jumping out of an airplane? It'll detect innocents.
You need to plan these out before implementing them in the future.


Re: Someone help me to fix my anti airbreak? - GangstaSunny - 10.02.2016

We actualy dont know how his "GetPlayerSpeed"-Function works. Maybe not, maybe yes. I recommend to work with the "mapandreas" plugin by kalcor or mauzen.


Re: Someone help me to fix my anti airbreak? - Vince - 10.02.2016

Quote:
Originally Posted by luccagomes15
Посмотреть сообщение
stoped on a big montain = airbreak detected...
Right?
Pretty much. The highest peak of Mount Chilliad sits at 525 meters on the Z-axis.