29.06.2018, 11:57
I have just "public OnPlayerDamage".
Codes here:
Codes here:
Код:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) { if(IsPlayerPaused(playerid)) return 0; if(issuerid != INVALID_PLAYER_ID) { if (PlayerData[issuerid][pPlayingHours] < 2) { SendClientMessage(issuerid, COLOR_LIGHTRED, "[UYARI]:{FFFFFF} Oyunda yeni olduğun iзin kimseye hasar veremezsin!"); PlayerData[issuerid][pDMUyari]++; PlayerData[issuerid][pDMUyariSure] = 5; if( PlayerData[issuerid][pDMUyari] >= 5 && PlayerData[issuerid][pDMUyariSure] > 0) { SendAdminAlert(COLOR_LIGHTRED, "[ADMIN]: %s yeni olduğu halde insanlara zarar vermeye зalıştığı iзin oyundan atıldı.", ReturnName(issuerid, 0)); SendServerMessage(issuerid, "Yeni olduğunuz ve uyarıldığınız halde ısrarla kişilere hasar vermeye зalıştığınız iзin oyundan atıldınız."); KickEx(issuerid); } return 0; } if (PlayerData[playerid][pPlayingHours] < 2) { SendClientMessage(issuerid, COLOR_LIGHTRED, "[UYARI]:{FFFFFF} Oyunda yeni olan oyunculara zarar veremezsin!"); return 0; } if(hack_WeaponCode(issuerid, weapon)) return 0; } if(issuerid != INVALID_PLAYER_ID) Hasar_Ekle(playerid, bodypart, amount, issuerid, weapon); if(bodypart == 7 || bodypart == 8) { PlayerData[playerid][pTopallama] = true; SetTimerEx("TopallamaDuzelt", 60*1000, false, "d", playerid); } // kan efekti bu SetTimerEx("HidePlayerBox", 500, false, "dd", playerid, _:ShowPlayerBox(playerid, 0xFF000066)); if (PlayerData[playerid][pFirstAid]) { SendClientMessage(playerid, COLOR_LIGHTRED, "[UYARI]:{FFFFFF} İlkyardım yaparken yaralandığın iзin ilkyardım iptal oldu."); PlayerData[playerid][pFirstAid] = 0; KillTimer(PlayerData[playerid][pAidTimer]); } /* if(playerid != INVALID_PLAYER_ID && GuvenliBolgedeyse(playerid) && GetFactionType(issuerid) != FACTION_POLICE) { Dialog_Show(issuerid, GBIUyari, DIALOG_STYLE_MSGBOX, "{FF0000}Gьvenli Bцlgedesiniz!", "{FFFFFF}Bulunduğunuz bцlge gьvenli bцlgedir, burada kavga silah\nateşleyemezsiniz. Eğer 1 dakika iзinde oyuncuya 3 kere zarar vermeye зalışırsanız sistem tarafından\n otomatik olarak Gьvenli Bцlge İhlalinden hapse atılırsınız!", "Tamam", ""); PlayerData[issuerid][pGBWarn]++; SetTimerEx("GBWarnReset", 15 * 1000, false, "d", issuerid); if(PlayerData[issuerid][pGBWarn] >= 3) { new time = tickcount() - 2000; if(time < Timer[issuerid][GBI]) return 1; SendClientMessageToAllEx(COLOR_LIGHTRED, "[ADMIN]: Sistem, %s adlı oyuncuyu 20 dakika hapse mвhkum etti. (Sebep: GBI)", ReturnName(issuerid, 0)); ClearAnimations(issuerid); PlayerTextDrawShow(issuerid, PlayerData[issuerid][pTextdraws][70]); PlayerData[issuerid][pGBWarn] = 0; JBC_SetPlayerPos(issuerid, 197.6346, 175.3765, 1003.0234); SetPlayerInterior(issuerid, 3); SetPlayerVirtualWorld(issuerid, (issuerid + 100)); SetPlayerFacingAngle(issuerid, 0.0); SetCameraBehindPlayer(issuerid); ResetWeapons(issuerid); ShowHungerTextdraw(issuerid, 0); ResetPlayer(issuerid); PlayerData[issuerid][pJailTime] = 20 * 60; PlayerData[issuerid][pPrisoned] = 0; } return 1; }*/ if (issuerid != INVALID_PLAYER_ID) {/* PlayerData[playerid][pLastShot] = issuerid; PlayerData[playerid][pShotTime] = gettime(); if (IsBleedableWeapon(weaponid) && !PlayerData[playerid][pBleeding] && ReturnArmour(playerid) < 1 && PlayerData[issuerid][pRangeBooth] == -1 && PlayerData[playerid][pHospital] == -1 && !PaintballOyunundami(issuerid)) { if (!PlayerHasTazer(issuerid) && !PlayerHasBeanBag(issuerid)) { PlayerData[playerid][pBleeding] = 1; PlayerData[playerid][pBleedTime] = 10; CreateBlood(playerid); SetTimerEx("HidePlayerBox", 500, false, "dd", playerid, _:ShowPlayerBox(playerid, 0xFF000066)); } } if (PlayerData[issuerid][pDrugUsed] == 4 && (weaponid >= 0 && weaponid <= 15)) { CanDegistir(playerid, ReturnHealth(playerid) - 6); }*/ if ((GetFactionType(issuerid) == FACTION_POLICE || GetFactionType(issuerid) == FACTION_GOV || GetFactionType(issuerid) == FACTION_AKADEMI || GetFactionType(issuerid) == FACTION_INTEL) && PlayerData[issuerid][pTazer] && PlayerData[playerid][pStunned] < 1 && weapon == 23) { if (GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendErrorMessage(issuerid, "Dondurmak iзin oyuncunun yayan olması gereklidir."); if (!PlayerData[playerid][pKartusHazir]) return SendErrorMessage(playerid, "Kartuş ateşe hazır değil."); if (GetPlayerDistanceFromPlayer(issuerid, playerid) > 10.0) return SendErrorMessage(issuerid, "Ateş etmek iзin зok uzaksın."); new strdamage[64]; format(strdamage, sizeof(strdamage), "%s tarafindan ~r~donduruldun~w~.", ReturnName(issuerid, 0)); PlayerData[playerid][pStunned] = 10; TogglePlayerControllable(playerid, 0); ApplyAnimation(playerid, "CRACK", "crckdeth4", 4.0, 0, 0, 0, 1, 0, 1); ShowPlayerFooter(playerid, strdamage); SendNearbyMessage(issuerid, 30.0, COLOR_PURPLE, "** %s elektroşok silahını %s'a yцneltir ve ateşler.", ReturnName(issuerid, 0), ReturnName(playerid, 0)); return 0; } if ((GetFactionType(issuerid) == FACTION_POLICE || GetFactionType(issuerid) == FACTION_INTEL) && PlayerData[issuerid][pBeanBag] && PlayerData[playerid][pStunned] < 1 && weapon == 25) { if (GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendErrorMessage(issuerid, "Dondurmak iзin oyuncunun yayan olması gereklidir."); if (GetPlayerDistanceFromPlayer(issuerid, playerid) > 10.0) return SendErrorMessage(issuerid, "Ateş etmek iзin зok uzaksın."); new strdamage[64]; format(strdamage, sizeof(strdamage), "%s tarafindan ~r~donduruldun~w~.", ReturnName(issuerid, 0)); PlayerData[playerid][pStunned] = 10; TogglePlayerControllable(playerid, 0); ApplyAnimation(playerid, "CRACK", "crckdeth4", 4.0, 0, 0, 0, 1, 0, 1); ShowPlayerFooter(playerid, strdamage); SendNearbyMessage(issuerid, 30.0, COLOR_PURPLE, "** %s beanbag tьfeğini %s'a yцneltir ve ateşler.", ReturnName(issuerid, 0), ReturnName(playerid, 0)); return 0; } } return 1; }