Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- forward DetectCheat(playerid, parte);
- public OnFilterScriptInit()
- {
- print("AntiCheat 0.3.7");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- enum pCheat {
- bool:Checado,
- bool:Checando,
- TempoChecagem,
- GolfClubID
- };
- new PlayerDetectCheat[MAX_PLAYERS][pCheat];
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- KillTimer(PlayerDetectCheat[playerid][TempoChecagem]);
- for(new pCheat:p; p < pCheat; p++)
- PlayerDetectCheat[playerid][p] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(PlayerDetectCheat[playerid][Checado] == false) {
- new Float:xyz[3];
- GetPlayerPos(playerid,xyz[0],xyz[1],xyz[2]);
- PlayerDetectCheat[playerid][Checando] = true;
- PlayerDetectCheat[playerid][GolfClubID] = CreateVehicle(457, xyz[0],xyz[1],xyz[2], 0.0, 0, 0, 0);
- SetVehicleVirtualWorld(PlayerDetectCheat[playerid][GolfClubID], playerid+1);
- SetPlayerVirtualWorld(playerid, playerid+1);
- PutPlayerInVehicle(playerid,PlayerDetectCheat[playerid][GolfClubID], 0);
- TogglePlayerControllable(playerid, false);
- PlayerDetectCheat[playerid][TempoChecagem]=SetTimerEx("DetectCheat", 300, false, "dd", playerid, 0);
- GameTextForPlayer(playerid, "~w~Nao interrompa a checagem!", 10000, 4);
- }
- return 1;
- }
- public DetectCheat(playerid, parte) {
- new Armas, Mun;
- switch(parte) {
- case 0: {
- RemovePlayerFromVehicle(playerid);
- DestroyVehicle(PlayerDetectCheat[playerid][GolfClubID]);
- PlayerDetectCheat[playerid][TempoChecagem]=SetTimerEx("DetectCheat", 2000, false, "dd", playerid,1);
- }
- case 1: {
- PlayerDetectCheat[playerid][Checado] = true;
- PlayerDetectCheat[playerid][Checando] = false;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, true);
- GetPlayerWeaponData(playerid, 1, Armas, Mun);
- if(Armas == 2) return Kick(playerid);
- GameTextForPlayer(playerid, "~g~Checagem concluida!", 5000, 4);
- }
- }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(PlayerDetectCheat[playerid][Checando] == true) return SendClientMessage(playerid, -1, "{FFFF00}Aguarde a checagem terminar!"), 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(PlayerDetectCheat[playerid][Checando] == true) return SendClientMessage(playerid, -1, "{FFFF00}Aguarde a checagem terminar!"), 0;
- return 0;
- }
- /*
- by NicK -> Nícolas Corrêa
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement