Advertisement
Guest User

Untitled

a guest
May 13th, 2014
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.76 KB | None | 0 0
  1. /* Basic deathmatch gamemode made by theuser!
  2.  
  3. This gamemode is intended for "Newbie" Scripters!
  4. Its easy to follow and add more things"
  5. */
  6.  
  7.  
  8. #include <a_samp> // for samp things
  9. #include <zcmd> // commands
  10.  
  11. new InGame[MAX_PLAYERS]; // If the player is currently in a dm session
  12. new NotAlive[MAX_PLAYERS]; // if the player is dead
  13. new Arena[MAX_PLAYERS]; // which arena is the player in (( only 1 by default add more if you wish ))
  14. main( ) { }
  15.  
  16. //color defines:
  17. #define Z22_LIGHTGREEN 0x7CFC00AA
  18. #define Z22_YELLOW 0xFFFF00AA
  19.  
  20. //server defines
  21. #define ScriptVersion "1.1"
  22. #define Website "websitehere"
  23. #define Teamspeak "teamspeakiphere"
  24. #define ServerName "Basic DM"
  25.  
  26. public OnGameModeInit()
  27. {
  28.     SetGameModeText(""ScriptVersion"");
  29.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  30.     printf("Gamemode Loaded");
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerRequestClass(playerid, classid)
  35. {
  36.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  37.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  38.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  39.     return 1;
  40. }
  41.  
  42. public OnPlayerConnect(playerid)
  43. {
  44.     SendClientMessage(playerid, Z22_YELLOW, "Welcome to "ServerName"");
  45.     SendClientMessage(playerid, Z22_YELLOW, "Teamspeak: "Teamspeak"");
  46.     SendClientMessage(playerid, Z22_YELLOW, "Website: "Website"");
  47.     InGame[playerid] = 0;
  48.     Arena[playerid] = 0; // puts the player into no arena change "0" to the arena number if you wish for players to spawn into dm session
  49.  
  50.     return 1;
  51. }
  52.      public OnPlayerSpawn(playerid)
  53. {
  54.  
  55.       if (NotAlive[playerid] == 1 &&
  56.         Arena[playerid] == 3)
  57.     {
  58.         SetPlayerInterior(playerid, 3);
  59.         SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
  60.         SetPlayerVirtualWorld(playerid, 1);
  61.         NotAlive[playerid] = 0;
  62. }
  63. return 1;
  64. }
  65.  
  66. public OnPlayerDeath(playerid, killerid)
  67. {
  68.     SetPlayerHealth(killerid, 100); //gives the player full health as a reward
  69.     SetPlayerArmour(killerid, 100); //gives the player full armour as a reward
  70.     NotAlive[playerid] = 1;
  71.     return 1;
  72. }
  73. CMD:enterdm(playerid, params[]) // Puts the player into a dm session
  74. {
  75.     InGame[playerid] = 1;
  76.     Arena[playerid] = 3;
  77.  
  78.     SendClientMessage(playerid, Z22_LIGHTGREEN, "You have joined the DM zone!"); // when a player joins dm they will see this message
  79.     SetPlayerInterior(playerid, 3);
  80.     SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
  81.     SetPlayerVirtualWorld(playerid, 1);
  82.     SetPlayerHealth(playerid, 100);
  83.     SetPlayerArmour(playerid, 100);
  84.     GivePlayerWeapon(playerid, 24, 100000); // unlimited ammo
  85.     GivePlayerWeapon(playerid, 25, 100000); // unlimited ammo
  86. return 1;
  87. }
  88.  
  89. CMD:help(playerid, params [])
  90. {
  91. SendClientMessage(playerid, Z22_YELLOW, "Use /enterdm to join the deathmatch!");
  92. return 1;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement