some help with Player Vars and IF here.
#1

trying to make a hp anticheat and i got it but it bans ppl on spawn, so i did this:

Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColor(playerid);
    SetPVarInt(playerid,"Hp Exception", 1);
    SetTimer("SetPVarInt(playerid,XD, 0)", 1000, false);
    
	return 1;
}
and then this under OnPlayerUpdate

Код:
if 1=(GetPVarInt(playerid, "HP exception"));
{
//something
}
but i get these errors at the If 1= Bla bla bla line:

Код:
C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(461) : warning 211: possibly unintended assignment
C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Testmode.pwn(461) : error 022: must be lvalue (non-constant)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

1 Error.

P.S: im using the Anticheat code from the Wiki(OnPlayerUpdate page)
Reply
#2

The timer wasnt a problem... the OnPlayerUpdate part is. this is just for the exception,and its working, but i get errors at the If line
Reply
#3

Actually at least i think its working....didnt give me any errors
Reply
#4

Nevermind i fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)