_iLustcheR_

DM by _Aviiii_ - Fixed by _iLustcheR_

Aug 8th, 2014
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.61 KB | None | 0 0
  1. new bool:InDM[MAX_PLAYERS char];
  2. new Float:DMSpawns[][] =
  3. {
  4.     {1356.0739, 2189.5330, 11.0234, 0, 7}, {1344.2948, 2105.2649, 11.0156, 0, 7},
  5.     {1302.4717, 2144.8911, 11.0234, 0, 7}, {1344.2948, 2105.2649, 11.0156, 0, 7},
  6.     {1356.0739, 2189.5330, 11.0234, 0, 7}, {1356.0739, 2189.5330, 11.0234, 0, 7},
  7.     {1344.2948, 2105.2649, 11.0156, 0, 7}, {1302.4717, 2144.8911, 11.0234, 0, 7}
  8. };
  9.  
  10. public OnPlayerSpawn(playerid)
  11. {
  12.     if(InDM{playerid} == 1)
  13.     {
  14.         new rand = random(sizeof(DMSpawns));
  15.         SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);
  16.         SetPlayerInterior(playerid, DMSpawns[rand][3]);
  17.         SetPlayerVirtualWorld(playerid, DMSpawns[rand][4]);
  18.     }
  19.     else SpawnPlayer(playerid);
  20.     return ;1
  21. }
  22.  
  23. public OnPlayerCommandText(playerid, cmdtext[])
  24. {
  25.     if(InDM{playerid} == 1) return SendClientMessage(playerid, -1, "/DM כדי לצאת מאזור , הקש/י");
  26.     if(!strcmp(cmdtext, "/Dm", true))
  27.     {
  28.         if(InDM{playerid} == 0)
  29.         {
  30.             new rand = random(sizeof(DMSpawns));
  31.             SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);
  32.             SetPlayerInterior(playerid, DMSpawns[rand][3]);
  33.             SetPlayerVirtualWorld(playerid, DMSpawns[rand][4]);
  34.             GivePlayerWeapon(playerid, 9, 9999);
  35.             GivePlayerWeapon(playerid, 16, 9999);
  36.             GivePlayerWeapon(playerid, 27, 9999);
  37.             GivePlayerWeapon(playerid, 29, 9999);
  38.             GivePlayerWeapon(playerid, 31, 9999);
  39.             GivePlayerWeapon(playerid, 34, 9999);
  40.             InDM{playerid} = 1;
  41.         }
  42.         else
  43.         {
  44.             SpawnPlayer(playerid);
  45.             ResetPlayerWeapons(playerid);
  46.             SetPlayerVirtualWorld(playerid, 0);
  47.             InDM{playerid} = 0;
  48.         }
  49.     }
  50.     return 1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment