Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- /* # Sistema Anti-Cheat */
- /* # Autor: Zoutdaxv */
- /* # Versión: 0.1 b */
- /* # Versión SA-MP: 0.3c */
- /* # Tipo de script: FilterScript */
- /* # Lenguaje: Castellano Neutro */
- /* # Fecha: 29/12/2010 15:43 HRS UTC/GTM -6 */
- /* # Actualización: 29/12/2010 15:43 HRS UTC/GTM -6 */
- /* # Créditos: */
- /* - Y_Less: Método para librerías */
- /* - elvago: Pruebas */
- //==============================================================================
- #include <a_samp>
- //============================ <VARIABLES> =====================================
- static
- Cb_OPD, //Callback OnPlayerDisconnect
- Cb_OPS, //Callback OnPlayerSpawn
- Cb_OPIC, //Callback OnPlayerInteriorChange
- Cb_OPPUP, //Callback OnPlayerPickUpPickup
- Cb_OVS, //Callback OnVehicleSpawn
- Cb_OPU; //Callback OnPlayerUpdate
- static WeaponNames[47][] = {
- "Sin arma", "Brass Knuckles", "Golf Club", "Nite Stick", "Knife", "Baseball Bat",
- "Shovel", "Pool Cue", "Katana", "Chainsaw", "Purple Dildo", "Small White Vibrator",
- "Large White Vibrator", "Silver Vibrator", "Flowers", "Cane", "Grenade", "Tear Gas",
- "Molotov Cocktail", "19", "20", "21", "9mm", "Silenced 9mm", "Desert Eagle",
- "Shotgun", "Sawn-off Shotgun", "Combat Shotgun", "Micro SMG", "SMG", "AK47", "M4",
- "Tec9", "Country Rifle", "Sniper Rifle", "Rocket Launcher", "HS Rocket Launcher",
- "Flamethrower", "Minigun", "Satchel Charge", "Detonator", "Spraycan",
- "Fire Extinguisher", "Camera", "Nightvision Goggles", "Thermal Goggles", "Parachute"
- };
- static
- bool:AC_BAN[MAX_PLAYERS] = {true, ...},
- Float:Health[MAX_PLAYERS] = {100.0, ...},
- Float:Armour[MAX_PLAYERS],
- Float:Position[MAX_PLAYERS][3],//0: X, 1: Y, 2: Z
- Float:VehicleHealth[MAX_VEHICLES] = {1000.0, ...},
- Weapon[MAX_PLAYERS],
- Ammo[MAX_PLAYERS],
- WeaponData[MAX_PLAYERS][13][2],
- Money[MAX_PLAYERS],
- NR_CheckCount[MAX_PLAYERS],//Count No reload
- UpdateCount[MAX_PLAYERS];
- //******************************************************************************
- //Configuración/Configuration:
- static
- Prohibited_Weapons[] = {16, 17, 18, 35, 36, 37, 38, 39, 40, 43, 44, 45},
- MAX_MONEY = 1000000,//Por defecto/Default: 1,000,000.
- MONEY_AMOUNT = 200;//:
- //SPA: Cantidad que detectará el Anti-Cheat, por defecto $200.
- //ENG: Amount of money that will detect the Anti-Cheat, by default $200.
- //------------------------------------------------------------------------------
- static
- bool:BAN = false, //true = ban, false = kick
- bool:Admin_Immunity = true, //Inmunidad para administradores RCON
- bool:AC_HH = true, //Health Hacks
- bool:AC_AH = true, //Armour Hacks
- bool:AC_VHH = true, //Vehicle Health Hacks
- bool:AC_VSH = true, //Vehicle Speed Hacks
- bool:AC_AB = true, //AirBreak
- bool:AC_T = true, //Teleport
- bool:AC_NR = true, //No Reload
- bool:AC_PW = true, //Prohibited weapon
- bool:AC_SW = true, //Spawn Weapon
- bool:AC_MH = true, //Money Hacks
- bool:AC_JP = true; //JetPack
- //******************************************************************************
- //==============================================================================
- public OnFilterScriptInit()
- {
- //--------------------------------------------------------------------------
- //Verificar si existen los Callbacks
- Cb_OPD = funcidx("ZVACCb_OnPlayerDisconnect") != -1;
- Cb_OPS = funcidx("ZVACCb_OnPlayerSpawn") != -1;
- Cb_OPIC = funcidx("ZVACCb_OnPlayerInteriorChange") != -1;
- Cb_OPPUP = funcidx("ZVACCb_OnPlayerPickUpPickup") != -1;
- Cb_OVS = funcidx("ZVACCb_OnVehicleSpawn") != -1;
- Cb_OPU = funcidx("ZVACCb_OnPlayerUpdate") != -1;
- new
- val = 1;
- if(funcidx("ZVACCb_OnFilterScriptInit") != -1)//Verificar si existe el Callback
- {
- val = CallLocalFunction("ZVACCb_OnFilterScriptInit", "");
- }
- //--------------------------------------------------------------------------
- print("\n");
- print(" $$$$$$$$$$$$$$$$$");
- print(" $ ZV Anti-Cheat $");
- print(" $ V 0.1 b $");
- print(" $$$$$$$$$$$$$$$$$");
- print("\n");
- return val;
- }
- //Renombrar el siguiente OnFilterScriptInit
- #if defined _ALS_OnFilterScriptInit
- #undef OnFilterScriptInit
- #else
- #define _ALS_OnFilterScriptInit
- #endif
- #define OnFilterScriptInit ZVACCb_OnFilterScriptInit
- //Forward el siguiente
- forward ZVACCb_OnFilterScriptInit();
- public OnFilterScriptExit()
- {
- //--------------------------------------------------------------------------
- new
- val = 1;
- if(funcidx("ZVACCb_OnFilterScriptExit") != -1)//Verificar si existe el Callback
- {
- val = CallLocalFunction("ZVACCb_OnFilterScriptExit", "");
- }
- //--------------------------------------------------------------------------
- return val;
- }
- //Renombrar el siguiente OnFilterScriptExit
- #if defined _ALS_OnFilterScriptExit
- #undef OnFilterScriptExit
- #else
- #define _ALS_OnFilterScriptExit
- #endif
- #define OnFilterScriptExit ZVACCb_OnFilterScriptExit
- //Forward el siguiente
- forward ZVACCb_OnFilterScriptExit();
- public OnPlayerDisconnect(playerid, reason)
- {
- AC_BAN[playerid] = true;//Activate Anti-Cheat BAN
- //Reset Variables:
- Health[playerid] = 100.0;
- Armour[playerid] = 0.0;
- Position[playerid][0] = 0.0;//X
- Position[playerid][1] = 0.0;//Y
- Position[playerid][2] = 0.0;//Z
- for(new w = 0; w < 13; w++)
- {
- WeaponData[playerid][w][0] = 0;
- WeaponData[playerid][w][1] = 0;
- }
- Money[playerid] = 0;
- NR_CheckCount[playerid] = 0;
- UpdateCount[playerid] = 0;
- //--------------------------------------------------------------------------
- //Si existe 'ZVACCb_OnPlayerDisconnect' se llama.
- if(Cb_OPD)
- {
- return CallLocalFunction("ZVACCb_OnPlayerDisconnect", "ii", playerid, reason);
- }
- //--------------------------------------------------------------------------
- return 1;
- }
- //Renombrar el siguiente OnPlayerDisconnect
- #if defined _ALS_OnPlayerDisconnect
- #undef OnPlayerDisconnect
- #else
- #define _ALS_OnPlayerDisconnect
- #endif
- #define OnPlayerDisconnect ZVACCb_OnPlayerDisconnect
- //Forward el siguiente
- forward ZVACCb_OnPlayerDisconnect(playerid, reason);
- public OnPlayerSpawn(playerid)
- {
- //Reset Variables:
- Health[playerid] = 100.0;
- NR_CheckCount[playerid] = 0;
- UpdateCount[playerid] = 0;
- //--------------------------------------------------------------------------
- //Si existe 'ZVACCb_OnPlayerSpawn' se llama.
- if(Cb_OPS)
- {
- return CallLocalFunction("ZVACCb_OnPlayerSpawn", "i", playerid);
- }
- //--------------------------------------------------------------------------
- return 1;
- }
- //Renombrar el siguiente OnPlayerSpawn
- #if defined _ALS_OnPlayerSpawn
- #undef OnPlayerSpawn
- #else
- #define _ALS_OnPlayerSpawn
- #endif
- #define OnPlayerSpawn ZVACCb_OnPlayerSpawn
- //Forward el siguiente
- forward ZVACCb_OnPlayerSpawn(playerid);
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- UpdateCount[playerid] = 0;
- //--------------------------------------------------------------------------
- //Si existe 'ZVACCb_OnPlayerInteriorChange' se llama.
- if(Cb_OPIC)
- {
- return CallLocalFunction("ZVACCb_OnPlayerInteriorChange", "iii", playerid, newinteriorid, oldinteriorid);
- }
- //--------------------------------------------------------------------------
- return 1;
- }
- //Renombrar el siguiente OnPlayerInteriorChange
- #if defined _ALS_OnPlayerInteriorChange
- #undef OnPlayerInteriorChange
- #else
- #define _ALS_OnPlayerInteriorChange
- #endif
- #define OnPlayerInteriorChange ZVACCb_OnPlayerInteriorChange
- //Forward el siguiente
- forward ZVACCb_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- UpdateCount[playerid] = 0;
- //--------------------------------------------------------------------------
- //Si existe 'ZVACCb_OnPlayerPickUpPickup' se llama.
- if(Cb_OPPUP)
- {
- return CallLocalFunction("ZVACCb_OnPlayerPickUpPickup", "ii", playerid, pickupid);
- }
- //--------------------------------------------------------------------------
- return 1;
- }
- //Renombrar el siguiente OnPlayerPickUpPickup
- #if defined _ALS_OnPlayerPickUpPickup
- #undef OnPlayerPickUpPickup
- #else
- #define _ALS_OnPlayerPickUpPickup
- #endif
- #define OnPlayerPickUpPickup ZVACCb_OnPlayerPickUpPickup
- //Forward el siguiente
- forward ZVACCb_OnPlayerPickUpPickup(playerid);
- public OnVehicleSpawn(vehicleid)
- {
- VehicleHealth[vehicleid] = 1000.0;
- //--------------------------------------------------------------------------
- //Si existe 'ZVACCb_OnVehicleSpawn' se llama.
- if(Cb_OVS)
- {
- return CallLocalFunction("ZVACCb_OnVehicleSpawn", "i", vehicleid);
- }
- //--------------------------------------------------------------------------
- return 1;
- }
- //Renombrar el siguiente OnVehicleSpawn
- #if defined _ALS_OnVehicleSpawn
- #undef OnVehicleSpawn
- #else
- #define _ALS_OnVehicleSpawn
- #endif
- #define OnVehicleSpawn ZVACCb_OnVehicleSpawn
- //Forward el siguiente
- forward ZVACCb_OnVehicleSpawn(vehicleid);
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;//NO NPCS
- if(Admin_Immunity && IsPlayerAdmin(playerid)) return 1;//Sin ban para administradores
- //========================= <ANTI-CHEAT> ===================================
- new
- Float:CurrentHealth,
- Float:CurrentArmour,
- InVehicle = IsPlayerInAnyVehicle(playerid),
- SeatID = GetPlayerVehicleSeat(playerid),
- Float:X,
- Float:Y,
- Float:Z,
- Float:CurrentVehHealth,
- Float:Speed,
- Float:Distance,
- CurrentWeapon,
- CurrentAmmo,
- SpecialAction = GetPlayerSpecialAction(playerid),
- keys,
- UD,
- LR,
- CurrentMoney,
- bool:LostHealth = false,
- reason[64];
- GetPlayerHealth(playerid, CurrentHealth);
- if(AC_HH)//HEALTH HACKS
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(CurrentHealth > Health[playerid] && CurrentHealth - Health[playerid] >= 40.0)
- {
- if(!IsPlayerInFastFood(playerid))
- {
- format(reason, sizeof reason, "HEALTH HACKS {+%0.2f}", CurrentHealth - Health[playerid]);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- }
- if(CurrentHealth < Health[playerid]) LostHealth = true;//Debug No reload
- Health[playerid] = CurrentHealth;
- GetPlayerArmour(playerid, CurrentArmour);
- if(AC_AH)//ARMOUR HACKS
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(CurrentArmour > Armour[playerid] && CurrentArmour - Armour[playerid] >= 40.0)
- {
- if(!IsPlayerInAmmuNation(playerid))
- {
- format(reason, sizeof reason, "ARMOUR HACKS {+%0.2f}", CurrentArmour - Armour[playerid]);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- }
- if(CurrentArmour < Armour[playerid]) LostHealth = true;//Debug No reload
- Armour[playerid] = CurrentArmour;
- GetPlayerPos(playerid, X, Y, Z);
- //VEHICLE HACKS
- if(InVehicle)
- {
- new
- VehicleID = GetPlayerVehicleID(playerid);
- GetVehicleHealth(VehicleID, CurrentVehHealth);
- if(AC_VHH)//VEHICLE HEALTH HACKS
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(CurrentVehHealth > VehicleHealth[VehicleID] && CurrentVehHealth - VehicleHealth[VehicleID] >= 200.0)
- {
- if(SeatID == 0)//Sólo conductores/Only drivers
- {
- if(!IsPlayerInPayNSpray(playerid))//No en Pay N Spray
- {
- if(!IsPlayerInModShop(playerid))//No en "ModShops"
- {
- format(reason, sizeof reason, "VEHICLE HEALTH HACKS {+%0.2f}", CurrentVehHealth - VehicleHealth[VehicleID]);
- ZVAC_Ban(playerid, reason);
- SetVehicleToRespawn(VehicleID);
- return 1;
- }
- }
- }
- }
- }
- }
- }
- VehicleHealth[VehicleID] = CurrentVehHealth;
- if(AC_VSH)//VEHICLE SPEED HACKS
- {
- ZVAC_GetVehicleSpeed(VehicleID, Speed);
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(Speed > 380.0)
- {
- if(Position[playerid][2] - Z < 1.5)//No caídas/Not falls
- {
- if(SeatID == 0)//Sólo conductores/Only drivers
- {
- format(reason, sizeof reason, "VEHICLE SPEED HACKS {%0.2f KM/H}", Speed);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- }
- }
- }
- Distance = ZVAC_GetDistance(X, Y, Z, Position[playerid][0], Position[playerid][1], Position[playerid][2]);
- if(AC_AB)//AIRBREAK
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(10.0 < Distance < 22.0)//es equivalente a/is equivalent to: (Distance > 10.0 && Distance < 22.0)
- {
- if(InVehicle)//IN VEHICLE
- {
- if(SeatID == 0)//Sólo conductores/Only drivers
- {
- if(Position[playerid][2] - Z < 1.5)//No caídas/Not falls
- {
- format(reason, sizeof reason, "AIRBREAK (IN VEHICLE) {%0.2f}", Distance);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- } else {//ON FOOT
- if(GetPlayerSurfingVehicleID(playerid) == INVALID_VEHICLE_ID)//No surfing on vehicle
- {
- format(reason, sizeof reason, "AIRBREAK (ON FOOT) {%0.2f}", Distance);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- }
- }
- if(AC_T)//TELEPORT
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(Distance > 23.0)
- {
- format(reason, sizeof reason, "Teleport {%0.2f}", Distance);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- CurrentAmmo = GetPlayerAmmo(playerid);
- CurrentWeapon = GetPlayerWeapon(playerid);
- if(AC_NR)//NO RELOAD
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- GetPlayerKeys(playerid, keys, UD, LR);
- //------------------------ DEBUG ---------------------------
- new
- animlib[32],
- animname[32];
- GetAnimationName(GetPlayerAnimationIndex(playerid), animlib, 32, animname, 32);
- if(!strcmp(animname, "CLIMB_", false, 6))
- NR_CheckCount[playerid] = 0;//trepar/climb (prevenir/prevent bug)
- if(LostHealth == true) NR_CheckCount[playerid] = 0; //Perdió salud/Lost health (fire no reload bug)
- if(CurrentWeapon != Weapon[playerid])
- NR_CheckCount[playerid] = 0;//Cambiar arma/Change weapon (tal vez/maybe 2-Shot)
- if(SpecialAction == SPECIAL_ACTION_DUCK)
- if(LR == KEY_RIGHT || LR == KEY_LEFT)
- NR_CheckCount[playerid] = 0;//prevenir/prevent bug
- if((keys & KEY_SPRINT) == KEY_SPRINT) NR_CheckCount[playerid] = 0;//Sprint/Esprintar
- else if((keys & KEY_JUMP) == KEY_JUMP) NR_CheckCount[playerid] = 0;//Saltar/Jump
- else if((keys & KEY_CROUCH) == KEY_CROUCH) NR_CheckCount[playerid] = 0;//Agacharse/Duck (prevenir/prevent bug)
- //----------------------------------------------------------
- else if((keys & KEY_FIRE) == KEY_FIRE)//Disparar/Shoot
- {
- //26: Sawn-off shotgun, 33: Rifle, 34: Sniper Rifle
- if(CurrentWeapon == 26 || CurrentWeapon == 33 || CurrentWeapon == 34)
- {
- if(Ammo[playerid] == CurrentAmmo)
- NR_CheckCount[playerid]++;
- if(GetPlayerWeaponState(playerid) == WEAPONSTATE_RELOADING)
- NR_CheckCount[playerid] = 0;
- if(NR_CheckCount[playerid] > 45)
- {
- format(reason, sizeof reason, "NO RELOAD {%s(%d)}", WeaponNames[CurrentWeapon], CurrentWeapon);
- ZVAC_Ban(playerid, reason);
- NR_CheckCount[playerid] = 0;
- return 1;
- }
- }
- }
- }
- }
- }
- Weapon[playerid] = CurrentWeapon;
- Ammo[playerid] = CurrentAmmo;
- for(new w = 0; w < 13; w++)
- {
- GetPlayerWeaponData(playerid, w, CurrentWeapon, CurrentAmmo);
- if(AC_PW)//PROHIBITED WEAPON
- {
- if(AC_BAN[playerid])
- {
- for(new pw = 0, m = sizeof Prohibited_Weapons; pw < m; pw++)
- {
- if(CurrentWeapon == Prohibited_Weapons[pw])
- {
- format(reason, sizeof reason, "PROHIBITED WEAPON {%s(%d)}", WeaponNames[CurrentWeapon], CurrentWeapon);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- if(AC_SW)//SPAWN WEAPON
- {
- if(AC_BAN[playerid])
- {
- if(!IsPlayerInAmmuNation(playerid))//No Ammu Nation
- {
- if(UpdateCount[playerid] > 50)//prevenir en/prevent in spawn
- {
- if(CurrentWeapon != WeaponData[playerid][w][0] && CurrentWeapon != 0)
- {
- format(reason, sizeof reason, "SPAWN WEAPON {%s(%d)[%d]}", WeaponNames[CurrentWeapon], CurrentWeapon, CurrentAmmo);
- ZVAC_Ban(playerid, reason);
- UpdateCount[playerid] = 0;
- return 1;
- }
- }
- }
- }
- }
- WeaponData[playerid][w][0] = CurrentWeapon;
- WeaponData[playerid][w][1] = CurrentAmmo;
- }
- Position[playerid][0] = X;
- Position[playerid][1] = Y;
- Position[playerid][2] = Z;
- CurrentMoney = GetPlayerMoney(playerid);
- if(AC_MH)//MONEY HACKS
- {
- if(AC_BAN[playerid])
- {
- if(UpdateCount[playerid] > 50)
- {
- if(CurrentMoney > MAX_MONEY)
- {
- format(reason, sizeof reason, "MONEY HACKS (MAX MONEY) {$%d}", CurrentMoney);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- else if(CurrentMoney - Money[playerid] > MONEY_AMOUNT)
- {
- format(reason, sizeof reason, "MONEY HACKS {+$%d}", CurrentMoney - Money[playerid]);
- ZVAC_Ban(playerid, reason);
- return 1;
- }
- }
- }
- }
- Money[playerid] = CurrentMoney;
- if(AC_JP)//JETPACK
- {
- if(AC_BAN[playerid])
- {
- if(SpecialAction == SPECIAL_ACTION_USEJETPACK)
- {
- ZVAC_Ban(playerid, "JETPACK");
- return 1;
- }
- }
- }
- UpdateCount[playerid]++;
- if(UpdateCount[playerid] > 100) UpdateCount[playerid] = 50;
- //==========================================================================
- //--------------------------------------------------------------------------
- //Si existe 'ZVACCb_OnPlayerUpdate' se llama.
- if(Cb_OPU)
- {
- return CallLocalFunction("ZVACCb_OnPlayerUpdate", "i", playerid);
- }
- //--------------------------------------------------------------------------
- return 1;
- }
- //Renombrar el siguiente OnPlayerUpdate
- #if defined _ALS_OnPlayerUpdate
- #undef OnPlayerUpdate
- #else
- #define _ALS_OnPlayerUpdate
- #endif
- #define OnPlayerUpdate ZVACCb_OnPlayerUpdate
- //Forward el siguiente
- forward ZVACCb_OnPlayerUpdate(playerid);
- //SPA: Rinicializar UpdateCount de un jugador en específico.
- //ENG: Reset UpdateCount for a specific player.
- forward ZVAC_ResetUC(playerid);
- public ZVAC_ResetUC(playerid)
- {
- if(IsPlayerConnected(playerid)) UpdateCount[playerid] = 0;
- }
- //SPA: Activar/Desactivar BAN para un jugador en específico.
- //ENG: Activate/Desactivate BAN for a specific player.
- forward ZVAC_BAN_Activate(playerid, activate);
- public ZVAC_BAN_Activate(playerid, activate)
- {
- if(IsPlayerConnected(playerid))
- {
- if(activate == 0) AC_BAN[playerid] = false;
- else if (activate == 1) AC_BAN[playerid] = true;
- }
- }
- stock ZVAC_Ban(playerid, const reason[])
- {
- new
- string[128],
- Nick[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nick, MAX_PLAYER_NAME);
- format(string, sizeof string, "> %s(%d) ha sido %s por el Anti-Cheat", Nick, playerid, BAN ? ("baneado") : ("expulsado"));
- SendClientMessageToAll(0xFF0000FF, string);
- printf("%s, razón: %s.", string, reason);
- if(BAN) BanEx(playerid, reason); else Kick(playerid);
- }
- forward Float:ZVAC_GetDistance(Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2);
- stock Float:ZVAC_GetDistance(Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2)
- {
- return floatsqroot(floatpower(X1 - X2, 2) + floatpower(Y1 - Y2, 2) + floatpower(Z1 - Z2, 2));
- }
- stock ZVAC_GetVehicleSpeed(vehicleid, &Float:Speed)
- {
- new
- Float:X,
- Float:Y,
- Float:Z;
- GetVehicleVelocity(vehicleid, X, Y, Z);
- Speed = floatsqroot(X * X + Y * Y + Z * Z) * 175;
- }
- stock IsPlayerInAmmuNation(playerid)
- {
- new
- Interior = GetPlayerInterior(playerid);
- if(Interior == 1 || Interior == 4 || Interior == 6 || Interior == 7) return 1;
- return 0;
- }
- stock IsPlayerInModShop(playerid)
- {
- new
- Interior = GetPlayerInterior(playerid);
- if(Interior == 1 || Interior == 2 || Interior == 3) return 1;
- return 0;
- }
- stock IsPlayerInFastFood(playerid)
- {
- new
- Interior = GetPlayerInterior(playerid);
- if(Interior == 10 || Interior == 9 || Interior == 5) return 1;
- return 0;
- }
- stock IsPlayerInPayNSpray(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 1976.6804, 2162.9897, 11.0703)
- || IsPlayerInRangeOfPoint(playerid, 15.0, -99.8578,1119.0826, 19.7417)
- || IsPlayerInRangeOfPoint(playerid, 15.0, -1420.6003, 2583.0466, 55.8433)
- || IsPlayerInRangeOfPoint(playerid, 15.0, 720.2489, -455.9286, 16.3359)
- || IsPlayerInRangeOfPoint(playerid, 15.0, 1024.7795, -1023.6094, 32.1016)
- || IsPlayerInRangeOfPoint(playerid, 15.0, 2065.1787, -1831.6390, 13.5469)
- || IsPlayerInRangeOfPoint(playerid, 15.0, -1904.2811, 284.9177, 41.0469)
- || IsPlayerInRangeOfPoint(playerid, 15.0, -2425.2358, 1020.6820, 50.3977)
- || IsPlayerInRangeOfPoint(playerid, 15.0, 487.4328, -1740.1508, 11.1375))
- {
- return 1;
- }
- return 0;
- }
- /*----------------------------------- FIN ------------------------------------*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement