Advertisement
dh240473

[Filterscript]Simple GodMode With Anti Kill!!

Oct 9th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.52 KB | None | 0 0
  1. //============================================================================//
  2. //========                GodMode By DH240473                         ========//
  3. //============================================================================//
  4. #include <a_samp>
  5. #include <zcmd>//Thx To Zeex For This Include
  6.  
  7. #define COLOR_RED "{FF0000}"//Define A Colour
  8.  
  9. new GodMode[MAX_PLAYERS];//Make A New Variable
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n God Mode System Has Been Loaded");
  14.     return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19.     print("\n God Mode System Has Been Unloaded");
  20.     return 1;
  21. }
  22. public OnPlayerDisconnect(playerid, reason)
  23. {
  24.     GodMode[playerid] = 0;//Set God Mode To 0 Or It's Will Make Other Player God And Your Server Will Bugged
  25.     return 1;
  26. }
  27. public OnPlayerSpawn(playerid)
  28. {
  29.     if(GodMode[playerid] == 1)
  30.     {
  31.         SetPlayerHealth(playerid, 99999);
  32.         SetPlayerArmour(playerid, 100);
  33.         GodMode[playerid] = 1;
  34.     }
  35.     else if(GodMode[playerid] == 0)
  36.     {
  37.         SetPlayerHealth(playerid, 100);
  38.         SetPlayerArmour(playerid, 100);
  39.         GodMode[playerid] = 0;
  40.     }
  41.     return 1;
  42. }
  43. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  44. {
  45.     if(GodMode[playerid] == 1)//Check Player That That Are Shooted While GodMode
  46.     {
  47.       GameTextForPlayer(issuerid, "~r~The Player You're Shooting Is Using GodMode", 1500, 5);//Send Message To Player That Are Shooting God Player
  48.     }
  49.     else if(GodMode[issuerid] == 1)//Check Player Cause The Damage GodMode True Or  Not
  50.     {
  51.       SetPlayerHealth(playerid, 100);//Anti Killing Innocent Player
  52.       GameTextForPlayer(issuerid, "~r~Don't Shooting Player While Using GodMode!", 1500, 5);//Send A GameText On Player That Shoot Innocent Player
  53.     }
  54.     return 1;
  55. }
  56.  
  57. CMD:god(playerid,params[])
  58. {
  59.   if(GodMode[playerid] == 1)
  60.   {
  61.    GodMode[playerid] = 0;//Make The GodMode Turned Off
  62.    SetPlayerHealth(playerid, 100);//To Disable The GodMode
  63.    SetPlayerArmour(playerid, 100);//Set Your Armour To 100
  64.    SendClientMessage(playerid, -1,"God Mode Has Turned "COLOR_RED"Off");//Send Message That GodMode Has Turned Off
  65.   }
  66.   else if(GodMode[playerid] == 0)
  67.   {
  68.    GodMode[playerid] = 1;//Make The GodMode Turned On
  69.    SetPlayerHealth(playerid, 9999);//SetPlayerHealth 9999 = Unlimited But If You Fall From Any Hight Place You Still Will Die
  70.    SetPlayerArmour(playerid, 100);//Set Your Armour To 100
  71.    SendClientMessage(playerid, -1,"God Mode Has Turned "COLOR_RED"On");//Send Message That GodMode Has Turned On
  72.   }
  73.   return 1;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement