/* ==================== [ Holttest Rendszer ] ==================== *//* ============================================================== *//* ======================= [ Készítette ] ======================= *//* ============================================================== *//* =================== [ Amf | SampForum.hu ] =================== *//* ============================================================== *//* ================== [ !!! NE TÖRÖLD KI !!! ] ================== *//* ============================================================== */#include <a_samp>#include <streamer>#include <zcmd>#define PIROS 0xFF0000AA#define MAX_HOLTTEST 50new Gyilkos[MAX_HOLTTEST], holttest[MAX_HOLTTEST], Object[MAX_HOLTTEST],pht[MAX_PLAYERS];new Float:Yh[MAX_HOLTTEST]= 0.000, Float:Xh[MAX_HOLTTEST] = 0.000, Float:Zh[MAX_HOLTTEST] = 0.000;stock NextHolt(){ for(new i; i<=MAX_HOLTTEST; i++) { if(Yh <= 0.000 && Xh <= 0.000 && Zh <= 0.000) return i; } return 1;}stock DestroyHolt(h){ DestroyDynamicObject(Object[h]); Gyilkos[h] = 0; holttest[h] = 0; Yh[h] = 0.000; Xh[h] = 0.000; Zh[h] = 0.000; return 1;} stock DestroyHoltEx(playerid){ if(pht[playerid] != 0) { DestroyDynamicObject(Object[pht[playerid]]); Gyilkos[pht[playerid]] = 0; holttest[pht[playerid]] = 0; Yh[pht[playerid]] = 0.000; Xh[pht[playerid]] = 0.000; Zh[pht[playerid]] = 0.000; pht[playerid] = 0; } return 1;}public OnPlayerDeath(playerid, killerid, reason){ DestroyHoltEx(playerid); new ht = NextHolt(); GetPlayerPos(playerid, Yh[ht], Xh[ht], Zh[ht]); Object[ht] = CreateDynamicObject(3092, Yh[ht], Xh[ht], Zh[ht], 0, 90, 274); Gyilkos[ht] = killerid; holttest[ht] = playerid; pht[playerid] = ht; return 1;}CMD:azonosit(playerid, params[]) //Csak természetes halálnál írja ki a gyilkost is!Ha parancsal ölöd meg, akkor nem!//{ for(new i; i<=MAX_HOLTTEST; i++) { if(!IsPlayerInRangeOfPoint(playerid, 3, Yh, Xh, Zh)) return SendClientMessage(playerid, PIROS, \"Nincs a közeledben holttest!\"); new name[128]; new name2[128]; new string[100]; GetPlayerName(Gyilkos, name, sizeof(name)); GetPlayerName(holttest, name2, sizeof(name2)); format(string, sizeof(string),\"Holttest: %s Megölte: %s\",name2, name); SendClientMessage(playerid, PIROS, string); DestroyDynamicObject(Object); for(new p; p<MAX_PLAYERS; p++) { if(i == pht[p]) return pht[p] = 0; } DestroyHolt(i); } return 1;}
/* ==================== [ Holttest Rendszer ] ==================== *//* ============================================================== *//* ======================= [ Készítette ] ======================= *//* ============================================================== *//* =================== [ Amf | SampForum.hu ] =================== *//* ============================================================== *//* ================== [ !!! NE TÖRÖLD KI !!! ] ================== *//* ============================================================== */#include <a_samp>#include <streamer>#include <zcmd>#define PIROS 0xFF0000AA#define MAX_HOLTTEST 50new Gyilkos[MAX_HOLTTEST], holttest[MAX_HOLTTEST], Object[MAX_HOLTTEST],pht[MAX_PLAYERS];new Float:Yh[MAX_HOLTTEST]= 0.000, Float:Xh[MAX_HOLTTEST] = 0.000, Float:Zh[MAX_HOLTTEST] = 0.000;stock NextHolt(){ for(new i; i<=MAX_HOLTTEST; i++) { if(Yh <= 0.000 && Xh <= 0.000 && Zh <= 0.000) return i; } return 1;}stock DestroyHolt(h){ DestroyDynamicObject(Object[h]); Gyilkos[h] = 0; holttest[h] = 0; Yh[h] = 0.000; Xh[h] = 0.000; Zh[h] = 0.000; return 1;} stock DestroyHoltEx(playerid){ if(pht[playerid] != 0) { DestroyDynamicObject(Object[pht[playerid]]); Gyilkos[pht[playerid]] = 0; holttest[pht[playerid]] = 0; Yh[pht[playerid]] = 0.000; Xh[pht[playerid]] = 0.000; Zh[pht[playerid]] = 0.000; pht[playerid] = 0; } return 1;}public OnPlayerDeath(playerid, killerid, reason){ DestroyHoltEx(playerid); new ht = NextHolt(); GetPlayerPos(playerid, Yh[ht], Xh[ht], Zh[ht]); Object[ht] = CreateDynamicObject(3092, Yh[ht], Xh[ht], Zh[ht], 0, 90, 274); Gyilkos[ht] = killerid; holttest[ht] = playerid; pht[playerid] = ht; return 1;}CMD:azonosit(playerid, params[]) //Csak természetes halálnál írja ki a gyilkost is!Ha parancsal ölöd meg, akkor nem!//{ new bool:talalt = false; for(new i; i<=MAX_HOLTTEST; i++) { if(IsPlayerInRangeOfPoint(playerid, 3, Yh, Xh, Zh)) { talalt = true; new name[128]; new name2[128]; new string[100]; GetPlayerName(Gyilkos, name, sizeof(name)); GetPlayerName(holttest, name2, sizeof(name2)); format(string, sizeof(string),\"Holttest: %s Megölte: %s\",name2, name); SendClientMessage(playerid, PIROS, string); DestroyDynamicObject(Object); for(new p; p<MAX_PLAYERS; p++) { if(i == pht[p]) return pht[p] = 0; } DestroyHolt(i); break; } } if(!talalt) return SendClientMessage(playerid, PIROS, \"Nincs a közeledben holttest!\"); return 1;}