Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new wait[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- wait[playerid] = 0;
- return 1;
- }
- new Float:Pos[MAX_PLAYERS][3];
- public OnPlayerUpdate(playerid)
- {
- new idx = GetPlayerAnimationIndex(playerid);
- if(!IsPlayerInRangeOfPoint(playerid, 20, Pos[playerid][0], Pos[playerid][1], Pos[playerid][2])) {
- // player has teleported? possibley by the script or by hacks, unable to tell, lets just tell the anticheat not to detect cam hacks for a few seconds.
- wait[playerid] = 0;
- }
- GetPlayerPos(playerid, Pos[playerid][0], Pos[playerid][1], Pos[playerid][2]);
- if(wait[playerid] > 150 && GetPlayerCameraMode( playerid ) != 56) {
- switch(idx) {
- case 1167, 1160..1162, 1331..1332, 1069..1070: {
- new Float:X, Float:Y, Float:Z;
- GetPlayerCameraPos(playerid, X, Y, Z);
- if(!IsPlayerInRangeOfPoint(playerid, 20, X, Y, Z) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
- Kick(playerid);
- }
- }
- }
- }
- wait[playerid]++;
- return 1;
- }
Add Comment
Please, Sign In to add comment