Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new
- actorid_aimbot;
- GameMode::Init()
- {
- actorid_aimbot = CreateActor(264, 1848.6160, 1352.1880, 16.9223, 0.0);
- return true;
- }
- YCMD:aimbot(playerid, params[], help)
- {
- new
- id;
- if(sscanf(params, "u", id)) return Scu(playerid, "/aimbot [ID/Pseudo du Joueur]");
- if(!IsPlayerConnected(id)) return Sce(playerid, "Ce joueur n'est pas connecté.");
- new
- Float:x,
- Float:y,
- Float:z,
- Float:angle;
- GetPlayerPos(id, x, y, z);
- GetPlayerFacingAngle(id, angle);
- new
- Float:x_actor = x + (2.5 * floatsin(-angle, degrees)),
- Float:y_actor = y + (2.5 * floatcos(-angle, degrees));
- SetActorPos(actorid_aimbot, x_actor, y_actor, z);
- SetTimerEx("Aimbot_Detection", 750, false, "ddfdd", playerid, id, angle + 3.6, 0, 0);
- return true;
- }
- forward Aimbot_Detection(playerid, aimbotid, Float:angle, test, detect);
- public Aimbot_Detection(playerid, aimbotid, Float:angle, test, detect)
- {
- new
- Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(aimbotid, x, y, z);
- new
- Float:x_actor = x + (1.5 * floatsin(-angle, degrees)),
- Float:y_actor = y + (1.5 * floatcos(-angle, degrees));
- SetActorPos(actorid_aimbot, x_actor, y_actor, z + 1.0);
- if(GetPlayerTargetActor(aimbotid) == actorid_aimbot) detect++;
- if(++test == 200)
- {
- Scm(playerid, -1, "[Aimbot] %d détections sur 200 pour l'ID %d", detect, aimbotid);
- SetActorPos(actorid_aimbot, 1848.6160, 1352.1880, 16.9223);
- return true;
- }
- return SetTimerEx("Aimbot_Detection", 25, false, "ddfdd", playerid, aimbotid, angle + 3.6, test, detect);
- }
Advertisement