NTNGuyenthanh

system lichsuchiendau

Aug 22nd, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1.  
  2. // Ctril + F "new bool" roi add cai nay o duoi
  3. new bool:InfoMessage[MAX_PLAYERS] = true;
  4. // Add tai. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  5. // neu gamemode nao thieu cai nao trong day thi "playerid, issuerid, Float: amount, weaponid" thi add them vao
  6. if(InfoMessage[playerid] == true) // version 2
  7. {
  8. if(issuerid != INVALID_PLAYER_ID)
  9. {
  10. new
  11. infoString[128],
  12. weaponName[24],
  13. victimName[MAX_PLAYER_NAME],
  14. attackerName[MAX_PLAYER_NAME];
  15.  
  16. GetPlayerName(playerid, victimName, sizeof (victimName));
  17. GetPlayerName(issuerid, attackerName, sizeof (attackerName));
  18.  
  19. GetWeaponName(weaponid, weaponName, sizeof (weaponName));
  20.  
  21. format(infoString, sizeof(infoString), "[Chien Dau] Ban bi {00bf00}%s{ffffff} su dung {ffff00}%s{ffffff} gay ton that {ff0000}%.02f", attackerName, weaponName, amount);
  22. SendClientMessage(playerid, 0xFFFFFFFF, infoString);
  23. }
  24. }
  25. // Add tai. public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
  26. // neu gamemodes nao thieu may cai nay "playerid, damagedid, Float:amount, weaponid" thi add vao
  27. if(InfoMessage[playerid] == true) // version 2
  28. {
  29. new string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
  30. new weaponname[24];
  31. GetPlayerName(playerid, attacker, sizeof (attacker));
  32. GetPlayerName(damagedid, victim, sizeof (victim));
  33.  
  34. GetWeaponName(weaponid, weaponname, sizeof (weaponname));
  35. format(string, sizeof(string), "[Chien Dau] Ban da dung {00bf00}%s{ffffff} gay cho {00bf00}%s{ffffff} ton that {ff0000}%.02f", weaponname, victim, amount);
  36. SendClientMessage(playerid, 0xFFFFFFFF, string);
  37. return 1;
  38. }
  39. // Add tren phan`: if(pMOTD[0]) { ShowPlayerDialog(playerid, PMOTDNOTICE, DIALOG_STYLE_MSGBOX, "
  40. // cai nay khong quan trong khoi add cung duoc
  41. SendClientMessageEx(playerid, COLOR_WHITE, "[-] Su dung /toglichsu, de bat hoac tat lich su sat thuong !");
  42. // comand add cho cmd:makeadmin
  43. // lich su
  44. CMD:toglichsu(playerid, params[])
  45. {
  46. if(InfoMessage[playerid] == false)
  47. {
  48. SendClientMessageEx(playerid, COLOR_WHITE, "*** Ban da bat lich su chien dau ( /toglichsu lan nua de tat )***");
  49.  
  50. InfoMessage[playerid] = true;
  51. }
  52. else
  53. {
  54. SendClientMessageEx(playerid, COLOR_WHITE, "*** Ban da tat lich su chien dau ( /toglichsu lan nua de bat )***");
  55.  
  56. InfoMessage[playerid] = false;
  57. }
  58. return 1;
  59. }
  60. /* code by danh */
Advertisement
Add Comment
Please, Sign In to add comment