23.01.2015, 14:54
OnPlayerConnect:
when firstly spawned add to line:
and add condition to your script (GetPVarInt) + EDIT health on spawn
Код:
SetPvarInt(playerid,"Test",1);
Код:
SetPvarInt(playerid,"Test",0);
Код:
public OnPlayerUpdate(playerid) { new Float:Health; GetPlayerHealth(playerid, Health); if(GetPVarInt(playerid,"Test") == 0) { if(Health > 99.0) { TogglePlayerControllable(playerid, false); SetPlayerPos(playerid, 1941.1534,-1100.2391,-23.7885); ShowPlayerDialog(playerid, DIALOG_PRAVILA,DIALOG_STYLE_MSGBOX,"Anti-Hack", "{FFCC00}[Anticheat]"BJELA"YOUKikovani ste sa servera\nRazlog kick-a:"CRVENA" Health Hack","Ok",""); BanEx(playerid, "Health Hack"); } } return 1; }
Код:
public OnPlayerSpawn(playerid) { SetPlayerHealth(playerid, 99.0); return 1; }