VIDEO #include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print(\"\\n--------------------------------------\"); print(\" WallShot 1.0 készítette: SupermaN betöltve !\"); print(\" WallShot 1.0 Fordította: citromhun(.so) !\"); print(\"--------------------------------------\\n\"); ConnectedPlayers = 0; return 1; } public OnFilterScriptExit() { return 1; } #else main() { print(\"\\n----------------------------------\"); print(\" Blank Gamemode by your name here\"); print(\"----------------------------------\\n\"); } #endif public OnPlayerDeath(playerid, killerid, reason) { if(killerid == INVALID_PLAYER_ID) { return SendClientMessage(playerid,-1,\" \"); } return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid,reason) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { return 0; } public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(hittype == 1) { } else { new szString[144]; new str1[256]; format(szString, sizeof(szString), \"Fegyver: %i. HIT(EK): %i HIT: %i Pozíció: %f, %f, %f\", weaponid, hittype, hitid, fX, fY, fZ); //SendClientMessage(playerid, -1, szString); if(fX < 2 && fY < 2 && fZ < 2 && fX > -2 && fY > -2 && fZ > -2) { } else { //HIT ÉRZÉKELÉS new pid = playerid; //SendClientMessage(playerid,-1,\"DEBUGPOINT:1\"); for(new j = 0;j<MAX_PLAYERS;j++) { //SendClientMessage(playerid,-1,\"DEBUGPOINT:2\"); if(IsPlayerConnected(j)) { //SendClientMessage(playerid,-1,\"DEBUGPOINT:3\"); if(j == playerid) { //SendClientMessage(playerid,-1,\"DEBUGPOINT:PLAYER-ID\"); } else { //SendClientMessage(playerid,-1,\"DEBUGPOINT:4\"); new Float:pX,Float:pZ,Float:pY; new pX2,pZ2,pY2; new fX2,fZ2,fY2; GetPlayerPos(j,pX,pY,pZ); pX2 = floatround(pX,floatround_round); pY2 = floatround(pY,floatround_round); pZ2 = floatround(pZ,floatround_round); fX2 = floatround(fX,floatround_round); fY2 = floatround(fY,floatround_round); fZ2 = floatround(fZ,floatround_round); if(fX2 < 0 && pX2 > 0) { fX2 = fX2 * -1; } if(fX2 > 0 && pX2 < 0) { fX2 = fX2 * -1; } if(fY2 < 0 && pY2 > 0) { fY2 = fY2 * -1; } if(fY2 > 0 && pY2 < 0) { fY2 = fY2 * -1; } if(fZ2 < 0 && pZ2 > 0) { fZ2 = fZ2 * -1; } if(fZ2 > 0 && pZ2 < 0) { fZ2 = fZ2 * -1; } new strsend[256]; format(strsend,256,\"Player Pozíció: %i , %i , %i Lövés pozíció: %i , %i , %i\",pX2,pY2,pZ2,fX2,fY2,fZ2); //SendClientMessage(playerid,-1,strsend); if((pY2 - fY2) < 5 && (pZ2 - fZ2) < 5 &&(pY2 - fY2) > -5 && (pZ2 - fZ2) > -5) { //PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); //SendClientMessage(playerid,-1,\"hit\"); switch(weaponid) { case 22: { minushealth(j,playerid,2,22); } case 23: { minushealth(j,playerid,2,23); } case 24: { minushealth(j,playerid,45,24); } case 25: { minushealth(j,playerid,10,25); } case 26: { minushealth(j,playerid,10,26); } case 27: { minushealth(j,playerid,10,27); } case 28: { minushealth(j,playerid,5,28); } case 29: { minushealth(j,playerid,7,29); } case 30: { minushealth(j,playerid,3,30); } case 31: { minushealth(j,playerid,6,31); } case 32: { minushealth(j,playerid,5,32); } case 33: { minushealth(j,playerid,25,33); } case 34: { minushealth(j,playerid,40,34); } case 38: { minushealth(j,playerid,50,38); } } } } } } //---------------------------------- } } return 1; } minushealth(playerid,killerid,amount,reason) { new Float:health,Float:armour; GetPlayerHealth(playerid,health); GetPlayerArmour(playerid,armour); if(armour >= amount) { SetPlayerArmour(playerid,armour-amount); } else if(armour > 0 && armour<amount) { amount = amount - armour; SetPlayerArmour(playerid,0); SetPlayerHealth(playerid,health - amount); } else if(armour < 1) { SetPlayerHealth(playerid,health - amount); } else if(health < amount) { SendDeathMessage(killerid, playerid,reason); } return 1; }