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 ) {
- new bool:cheat = false;
- switch(weaponid) {
- case 26: cheat = true;
- case 35..40: cheat = true;
- case 44..46: cheat = true;
- }
- if(cheat == true && !PlayerInfo[playerid][pAdmin]) {
- return AdmBot(playerid, "possible weapon-hack #3");
- }
- 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");
- return 0;
- }
- }
- if(hittype == BULLET_HIT_TYPE_PLAYER && (isBadFloat(fX) || isBadFloat(fY) || isBadFloat(fZ))) {
- AdmBot(playerid, "possible weapon crash #1");
- return 0;
- }
- if((fX == floatstr("-0.009999")) && (fY == floatstr("-0.019999")) && (fZ == floatstr("0.039999"))) {
- AdmBot(playerid, "possible weapon crash #2");
- return 0;
- }
- if((((weaponid >= 0 && weaponid <= 15) || weaponid == 40 || weaponid >= 44) || (hitid == 0 && fX == 0 && fY == 0 && fZ == 0))) {
- KickEx(playerid);
- return 0;
- }
- if(PlayerInfo[playerid][pGunLic] < 1 && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pFPS] >= 1) {
- SendAdmins(COLOR_RED1, "Kick: %s was kicked by AdmBot, reason: weapon hack (without licence).", 1, GetName(playerid));
- Kick(playerid);
- return false;
- }
- if( hittype != BULLET_HIT_TYPE_NONE )
- {
- if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) )
- {
- SendAdmins(COLOR_RED1, "Kick: %s was kicked by AdmBot, reason: weapon hack #1.", 1, GetName(playerid));
- Kick(playerid);
- return false;
- }
- }
- if(!((22 <= weaponid <= 34) || weaponid == 38) && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pFPS] >= 1) {
- SendAdmins(COLOR_RED1, "Kick: %s was kicked by AdmBot, reason: weapon hack #2.", 1, GetName(playerid));
- Kick(playerid);
- return false;
- }
- switch( hittype ) {
- case 1: {
- foreach( new x : Player ) {
- if( Spectate[ x ] == playerid ) DMInfo[ playerid ][ 0 ] = fX, DMInfo[ playerid ][ 1 ] = fY; DMInfo[ playerid ][ 2 ] = fZ;
- }
- }
- case 2: {
- foreach( new x : Player ) {
- if( Spectate[ x ] == playerid && PlayerInfo[ x ][ pAdmin ] >= 1 && ShowDMG[ x ] ) SCMf( x, COLOR_DARKPINK, "DMG: %s did damage to vehicle %d using a %s.", GetName( playerid ), hitid, weapName( weaponid ) );
- }
- }
- }
- return true; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement