06.03.2017, 07:14
Hello guys please help me, after i do this it give me 2 errors but idk what is wrong with it
And the errors
Help me please
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) { if(GetPVarInt(playerid, "commitSuicide") == 1) { SetPVarInt(playerid, "commitSuicide", 0); } if(issuerid != INVALID_PLAYER_ID && issuerid != playerid && PlayerInfo[issuerid][pAdmin] < 4 && weaponid == 38 && antiCheat && PlayerInfo[issuerid][pBanned] != 3) { if(PlayerInfo[issuerid][pGuns][7] != 38) { new string[256]; SetPVarInt(issuerid, "_HACK_WARNINGS", 0 ); RemovePlayerWeapon(issuerid, weaponid); PlayerInfo[issuerid][pBanned] = 3; new playerip[32]; GetPlayerIp(issuerid, playerip, sizeof(playerip)); format(string, sizeof(string), "AdmWarn: %s(%d - %s) has been banned by ANTICHEAT, reason: Fake Bullets / Illegal modification", GetPlayerNameEx(issuerid), issuerid, playerip); PlayerInfo[issuerid][pBanned] = 3; ABroadCast(COLOR_LIGHTRED, string, 2); Log("logs/ban.log", string); SystemBan(issuerid, "[System] (Fake Bullets)"); MySQLBan(GetPlayerSQLId(issuerid), playerip, "Fake Bullets", 1,"System"); SetTimerEx("KickEx", 1000, 0, "i", issuerid); TotalAutoBan++; SendClientMessageEx(issuerid, COLOR_LIGHTRED, "The ANTICHEAT system has detected you as a {FFFFFF}hacker{FF0000}. You have been banned."); SendClientMessageEx(issuerid, COLOR_LIGHTRED, "If you believe this was an error please feel free to head to "WEBSITE" and make a ban appeal."); return 1; } } if(issuerid != INVALID_PLAYER_ID) { ShotPlayer[issuerid][playerid] = gettime(); LastShot[playerid] = gettime(); aLastShot[playerid] = issuerid; if(GetPVarType(playerid, "gt_Spraying")) { DeletePVar(playerid, "gt_Spraying"); } if(prisonactive == 0) { if(amount == 0) { if(weaponid != 54 && weaponid != 4) { if(GetPVarInt(playerid, "CleoWarning") == 2) { if(PlayerInfo[playerid][pJailTime] > 0) return 1; new totalwealth = PlayerInfo[playerid][pAccount] + GetPlayerCash(playerid); if(PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey]][hSafeMoney]; if(PlayerInfo[playerid][pPhousekey2] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey2]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey2]][hSafeMoney]; new fine = 15*totalwealth/100; if(fine < 1) fine = 1000000; GivePlayerCash(playerid, -fine); PlayerInfo[playerid][pWarns] += 1; SetPlayerArmedWeapon(playerid, 0); if(GetPVarInt(playerid, "IsInArena") >= 0) { LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena")); } new string[128]; GameTextForPlayer(playerid, "~w~Welcome to ~n~~r~Fort DeMorgan", 5000, 3); ResetPlayerWeaponsEx(playerid); SendClientMessageEx(playerid, COLOR_CYAN, "A 15% CLEO tax has been assessed to your account along with a 3 hour prison - future use could result in a ban"); ShowPlayerDialog(playerid,DIALOG_NOTHING,DIALOG_STYLE_MSGBOX,"BUSTED!","A 15% CLEO tax has been assessed to your account along with a 3 hour prison - future use could result in a ban","Exit",""); if(PlayerInfo[playerid][pLevel] > 3) { format(string, sizeof(string), "AdmCmd: %s has been prisoned by Admin, reason: BUSTED!", GetPlayerNameEx(playerid), GetPlayerNameEx(playerid)); SendClientMessageToAllEx(COLOR_LIGHTRED, string); } else { format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has been prisoned by Admin, reason: BUSTED!", GetPlayerNameEx(playerid), GetPlayerNameEx(playerid)); ABroadCast(COLOR_YELLOW, string, 3); } PlayerInfo[playerid][pWantedLevel] = 0; SetPlayerWantedLevel(playerid, 0); SetPlayerHealth(playerid, 0x7FB00000); PlayerInfo[playerid][pJailTime] = 180*60; SetTimerEx("IdiotSound", 10000, 0, "i", playerid); strcpy(PlayerInfo[playerid][pPrisonReason], "[OOC][PRISON] BUSTED!", 128); strcpy(PlayerInfo[playerid][pPrisonedBy], "System", 128); PhoneOnline[playerid] = 1; SetPlayerInterior(playerid, 1); PlayerInfo[playerid][pInt] = 1; new rand = random(sizeof(OOCPrisonSpawns)); Streamer_UpdateEx(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]); SetPlayerPos(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]); SetPlayerSkin(playerid, 50); SetPlayerColor(playerid, TEAM_APRISON_COLOR); Player_StreamPrep(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2], FREEZE_TIME); new WeaponName[ 32 ]; GetWeaponName( weaponid, WeaponName, sizeof( WeaponName ) ); format(string, sizeof(string), "[PRISONED] %s(%d) (Ping: %d) | damage: %f | Weapon: %s | Issuer: %s(%d) | Frames: %d", GetPlayerNameExt(playerid), playerid, GetPlayerPing(playerid), amount, WeaponName, GetPlayerNameExt(issuerid), issuerid, pFPS[playerid]); Log("logs/cleo.log", string); foreach(new i : Player) { if(IsPlayerAdmin(i)) { SendClientMessageEx(i, COLOR_CYAN, string); } } DeletePVar(playerid, "CleoWarning"); } else { new WeaponName[ 32 ], string[128]; GetWeaponName( weaponid, WeaponName, sizeof( WeaponName ) ); format(string, sizeof(string), "%s(%d) (Ping: %d) | damage: %f | Weapon: %s | Issuer: %s(%d) | Frames: %d", GetPlayerNameExt(playerid), playerid, GetPlayerPing(playerid), amount, WeaponName, GetPlayerNameExt(issuerid), issuerid, pFPS[playerid]); Log("logs/cleo.log", string); foreach(new i : Player) { if(IsPlayerAdmin(i)) { SendClientMessageEx(i, COLOR_CYAN, string); } } SetPVarInt(playerid, "CleoWarning", GetPVarInt(playerid, "CleoWarning")+1); } } } } } if(GetPVarInt(playerid, "PlayerCuffed") == 1) { new Float:currenthealth; GetPlayerHealth(playerid, currenthealth); if(currenthealth+amount > 100) SetPlayerHealth(playerid, 100); else SetPlayerHealth(playerid, currenthealth+amount); } foreach(new i: Player) { if(PlayerInfo[i][pAdmin] >= 2 && GetPVarType(i, "_dCheck") && GetPVarInt(i, "_dCheck") == playerid) { new string[128]; format(string, sizeof(string), "Damagecheck on %s: Issuer: %s (%d) | Weapon: %s | Damage: %f", GetPlayerNameEx(playerid), GetPlayerNameEx(issuerid), issuerid, GetWeaponNameEx(weaponid), amount); SendClientMessageEx(i, COLOR_WHITE, string); } } new Float:actual_damage = amount; //fitness damage modifier if (weaponid == 0 || weaponid == 1 || weaponid == 2 || weaponid == 3 || weaponid == 5 || weaponid == 6 || weaponid == 7 || weaponid == 8) { new Float: multiply; if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pJailTime] > 0 || HelpingNewbie[playerid] != INVALID_PLAYER_ID || GetPVarInt(playerid, "eventStaff") >= 1) return 1; if(hgActive == 1 && HungerPlayerInfo[playerid][hgInEvent] == 1) return 1; if (PlayerInfo[issuerid][pFitness] < 50) { multiply = 2; } else if (PlayerInfo[issuerid][pFitness] >= 50 && PlayerInfo[issuerid][pFitness] <= 79) { multiply = 3.5; } else if (PlayerInfo[issuerid][pFitness] >= 80) { multiply = 5; } if (PlayerInfo[playerid][pFitness] >= 80) { actual_damage = actual_damage/2; } actual_damage *= multiply; } //heroin damage reduction if (GetPVarInt(playerid, "HeroinDamageResist") == 1) { actual_damage *= 0.25; } //armor & hp calculations AFTER damage modifiers new Float:difference; new Float:health, Float:armour; GetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armour); if (armour == 0) { if (actual_damage > amount) { difference = actual_damage - amount; SetPlayerHealth(playerid, health - difference); } else if (actual_damage < amount) { difference = amount - actual_damage; SetPlayerHealth(playerid, health - difference); } } else if (armour >= actual_damage) { if (actual_damage > amount) { difference = actual_damage - amount; SetPlayerArmor(playerid, armour - difference); } else if (actual_damage < amount) { difference = amount - actual_damage; SetPlayerArmor(playerid, armour - difference); } } else // damage needs to be split between armour & health { if (actual_damage > amount) { difference = actual_damage - amount; new Float:leftOver = difference - armour; SetPlayerArmor(playerid, 0); SetPlayerHealth(playerid, health - leftOver); } else if (actual_damage < amount) { difference = amount - actual_damage; new Float:leftOver = difference - armour; SetPlayerArmor(playerid, 0); SetPlayerHealth(playerid, health - leftOver); } } if(issuerid == INVALID_PLAYER_ID) return 1; if(playerExecute[issuerid] && IsAHitman(issuerid) && bodypart == 9 && GoChase[issuerid] == playerid) { if(GetPVarType(playerid, "IsFrozen")) return SendClientMessageEx(issuerid, COLOR_LIGHTRED, "That player is currently frozen, you cannot execute them!"); if(weaponid != 24 && weaponid != 25 && weaponid != 34 && weaponid != 27 ) return SendClientMessageEx(issuerid, COLOR_GREY, "You cannot headshot with this weapon."); if(GoChase[issuerid] == playerid) { new rand = random(100); new spasrand = 25; if(PlayerInfo[issuerid][pHunger] > 30) { spasrand = spasrand-10; } if(rand <= spasrand) { // fail SendClientMessageEx(issuerid, COLOR_GREY, "Your weapon spased out, you weren't able to make a direct hit to the head, try again."); return 1; } if(weaponid != 34) { new Float: x, Float: y, Float: z; GetPlayerPos(issuerid, x, y, z); if(!IsPlayerInRangeOfPoint(playerid, 15.0, x, y, z)) { SendClientMessageEx(issuerid, COLOR_GREY, "You are not close enough to that player to headshot."); return 1; } } SetPlayerArmour(playerid, 0); SetPlayerHealth(playerid, 0); playerExecute[issuerid] = 0; new string[64]; format(string, sizeof(string), "You have executed %s, headshot mode has been disaled.", GetPlayerNameEx(playerid), playerid); SendClientMessageEx(issuerid, COLOR_LIGHTBLUE, string); } } return 1; } public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) { if (damagedid == INVALID_PLAYER_ID) return 1; if (playerid == INVALID_PLAYER_ID) return 1; if(pTazer{playerid} == 1) { if(weaponid != 23) { new string[44 + MAX_PLAYER_NAME]; RemovePlayerWeapon(playerid, 23); GivePlayerValidWeapon(playerid, pTazerReplace{playerid}, 60000); format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); pTazer{playerid} = 0; return 1; } if(!ProxDetectorS(20.0, playerid, damagedid)) { new string[44 + (MAX_PLAYER_NAME * 2)]; format(string, sizeof(string), "* %s fires their tazer at %s, missing them.", GetPlayerNameEx(playerid), GetPlayerNameEx(damagedid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } if(TazerTimeout[playerid] > 0 && !GetPVarType(damagedid, "IsFrozen")) { new Float:hp; GetPlayerHealth(damagedid, hp); SetPlayerHealth(damagedid, hp-amount); return 1; } if(GetPlayerState(damagedid) == PLAYER_STATE_ONFOOT && PlayerCuffed[damagedid] == 2 && PlayerInfo[playerid][pHasTazer] == 1) { if(TazerTimeout[playerid] > 0) return 1; // tazer is still reloading....... if(PlayerInfo[damagedid][pAdmin] >= 2 && PlayerInfo[damagedid][pTogReports] != 1) { SendClientMessageEx(playerid, COLOR_GRAD2, "Admins can not be tazed!"); new Float:hp; GetPlayerHealth(damagedid, hp); SetPlayerHealth(damagedid, hp+amount); return 1; } #if defined zombiemode if(GetPVarInt(damagedid, "pIsZombie")) { SendClientMessageEx(playerid, COLOR_GRAD2, "Zombies can not be tazed!"); return 1; } #endif new Float:X, Float:Y, Float:Z, Float:hp; GetPlayerPos(playerid, X, Y, Z); GetPlayerHealth(damagedid, hp); new string[44 + (MAX_PLAYER_NAME * 2)]; format(string, sizeof(string), "* %s fires their tazer at %s, sending them to the floor.", GetPlayerNameEx(playerid), GetPlayerNameEx(damagedid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(damagedid, "~r~Tazed", 3500, 3); SetPlayerHealth(damagedid, hp+amount); ApplyAnimation(damagedid, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1); SetPVarInt(damagedid, "IsFrozen", 1); PlayerPlaySound(damagedid, 1085, X, Y, Z); PlayerPlaySound(playerid, 1085, X, Y, Z); TazerTimeout[playerid] = 6; SetTimerEx("TazerTimer",1000,false,"d",playerid); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~r~Tazer reloading... ~w~5", 1500,3); } if(GetPlayerState(damagedid) == PLAYER_STATE_ONFOOT && PlayerCuffed[damagedid] == 0 && PlayerInfo[playerid][pHasTazer] == 1) { if(PlayerInfo[damagedid][pAdmin] >= 2 && PlayerInfo[damagedid][pTogReports] != 1) { SendClientMessageEx(playerid, COLOR_GRAD2, "Admins can not be tazed!"); new Float:hp; GetPlayerHealth(damagedid, hp); SetPlayerHealth(damagedid, hp+amount); return 1; } #if defined zombiemode if(GetPVarInt(damagedid, "pIsZombie")) { SendClientMessageEx(playerid, COLOR_GRAD2, "Zombies can not be tazed!"); return 1; } #endif new Float:X, Float:Y, Float:Z, Float:hp; GetPlayerPos(playerid, X, Y, Z); GetPlayerHealth(damagedid, hp); new string[44 + (MAX_PLAYER_NAME * 2)]; format(string, sizeof(string), "* %s fires their tazer at %s, stunning them.", GetPlayerNameEx(playerid), GetPlayerNameEx(damagedid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(damagedid, "~r~Tazed", 3500, 3); SetPlayerHealth(damagedid, hp+amount); TogglePlayerControllable(damagedid, 0); ApplyAnimation(damagedid,"CRACK","crckdeth2",4.1,0,1,1,1,1,1); PlayerPlaySound(damagedid, 1085, X, Y, Z); PlayerPlaySound(playerid, 1085, X, Y, Z); PlayerCuffed[damagedid] = 1; SetPVarInt(damagedid, "PlayerCuffed", 1); PlayerCuffedTime[damagedid] = 16; SetPVarInt(damagedid, "IsFrozen", 1); TazerTimeout[playerid] = 6; SetTimerEx("TazerTimer",1000,false,"d",playerid); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~r~Tazer reloading... ~w~5", 1500,3); } } return 1; }
Код:
error 025: function heading differs from prototype error 025: function heading differs from prototype