Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
- foreach(new i : Player) {
- if(PlayerInfo[i][pJobVehicle] != 0) {
- new wep = GetPlayerWeapon(playerid);
- if((wep > 0 && wep < 43) && hitid == PlayerInfo[i][pJobVehicle] && !IsACop(playerid) && GetPlayerVirtualWorld(playerid) < 1) {
- SetPlayerArmedWeapon(playerid,0);
- SendClientMessage(playerid, RED2, "Nu poti folosi armele pe masinile de la job-uri. Poti petrece 30-90 minute in inchisoare pentru DM!");
- return 0;
- }
- }
- }
- if(hittype == 2) {
- foreach(new i : Player) {
- if(playerSpectateID[i] == playerid) {
- if(PlayerInfo[i][pAdmin] >= 1 && ShowDMG[i] == 1) va_sendLongMessage(i, 0xE7AAA5A5, "DMG: %s did damage to vehicle %d using weapon %s.",GetName(playerid),hitid,GetWName(weaponid));
- }
- }
- }
- if(hittype == 1) {
- foreach(new i : Player) {
- if(playerSpectateID[i] == playerid) DMInfo[playerid][0] = fX, DMInfo[playerid][1] = fY, DMInfo[playerid][2] = fZ;
- }
- }
- if(hittype != BULLET_HIT_TYPE_NONE) {
- if(!(-1000.0 <= fX <= 1000.0) || !(-1000.0 <= fY <= 1000.0) || !(-1000.0 <= fZ <= 1000.0)) {
- AdmBot(playerid, "possible weapon crash", 1);
- return 0;
- }
- }
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
- {
- if(damagedid != INVALID_PLAYER_ID) {
- if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID) return 1;
- foreach(new i : Player) {
- if(playerSpectateID[i] == playerid) {
- if(PlayerInfo[i][pAdmin] >= 1 && ShowDMG[i] == 1) va_sendLongMessage(i, 0xE7AAA5A5, "DMG: %s did %f damage to %s using weapon %s. [hit: %f %f %f] [bodypart: %d]",GetName(playerid),amount,GetName(damagedid),GetWName(weaponid),DMInfo[playerid][0],DMInfo[playerid][1],DMInfo[playerid][2],bodypart);
- }
- }
- if(weaponid == WEAPON_PARACHUTE && amount > 10) {
- AdmBot(playerid, "Cheats (possible fake damage)", 1);
- return 0;
- }
- if(amount > 10.0 && amount != 54.12 && weaponid == 0) {
- AdmBot(playerid, "Cheats (possible fake damage)", 1);
- return 0;
- }
- if(amount < 0) {
- AdmBot(playerid, "Cheats (possible fake damage)", 1);
- return 0;
- }
- if(amount > 9.8 && amount < 9.9 && weaponid == WEAPON_M4) {
- AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
- return 0;
- }
- if(amount == 46 && weaponid == WEAPON_DEAGLE) {
- AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
- return 0;
- }
- if(amount == 24.642856 && weaponid == WEAPON_RIFLE) {
- AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
- return 0;
- }
- if(amount == 9.857147 && weaponid == WEAPON_AK47) {
- AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
- return 0;
- }
- new fpm = PlayerInfo[playerid][pGroup];
- new fkm = PlayerInfo[damagedid][pGroup];
- for(new turf = 1; turf < sizeof(ZoneInfo); turf++) {
- if(IsPlayerInTurf(playerid, turf) && IsPlayerInTurf(damagedid, turf)) {
- if(IsAMember(playerid) && IsAMember(damagedid)) {
- if(WarInfo[turf][wFaction] == fpm && WarInfo[turf][wAttacker] == fkm || WarInfo[turf][wFaction] == fkm && WarInfo[turf][wAttacker] == fpm) PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
- }
- }
- }
- new weaponName[526];
- GetWeaponName(weaponid, weaponName, sizeof (weaponName));
- if(TazerON[playerid] == 1 && IsACop(playerid) && weaponid == 23)
- new chance = random(10);
- if(Tazed[damagedid] != 0) return SendClientMessage(playerid, COLOR_ERROR, "Acest jucator este deja prins.");
- if(IsACop(damagedid)) return SendClientMessage(playerid, COLOR_ERROR, "Nu poti prinde coechiperii.");
- if(IsPlayerInAnyVehicle(damagedid)) return SendClientMessage(playerid, COLOR_ERROR, "Acest jucator este intr-un vehicul.");
- switch(chance) {
- case 0,2,4,6,8: {
- va_SendClientMessage(damagedid, COLOR_SYN2,"Ai fost prins de %s pentru 3 secunde.", GetName(playerid));
- va_SendClientMessage(playerid, COLOR_SYN2, "L-ai prins pe %s pentru 3 secunde.", GetName(damagedid));
- va_ProxDetector(30.0, playerid, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE, "* %s incearca sa-l prinda pe %s, acesta a fost prins.", GetName(playerid) ,GetName(damagedid));
- GameTextForPlayer(damagedid, "~r~Tazed", 2500, 3);
- TogglePlayerControllableEx(damagedid, 0);
- Tazed[damagedid] = 1;
- ApplyAnimation(damagedid,"PED","KO_skid_front",4.1,0,1,1,1,0);
- amount = 0;
- SetTimerEx("unfr", 3000, false, "i", damagedid);
- }
- case 1,3,5,7,9: {
- va_ProxDetector(30.0, playerid, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE, "* %s incearca sa-l prinda pe %s, dar a scapat.", GetName(playerid) ,GetName(damagedid));
- amount = 0;
- }
- }
- }
- if(PaintType[playerid] > 0) PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
- if(PaintType[damagedid] > 0) {
- if(PaintTime[PaintType[damagedid]-1] < 1) SetPlayerHealth(damagedid, 100.0);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement