Advertisement
Guest User

Untitled

a guest
Oct 24th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. public OnPlayerCommandText(playerid, cmdtext[])
  2. {
  3. if(strcmp(cmdtext, "/dm", true) == 0)
  4. {
  5. if(PlayerInfo[playerid][pDM] == 1 && PlayerInfo[playerid][pDM] == 2)
  6. {
  7. SendClientMessage(playerid,COLOR_RED,"Vous êtes déjà dans un DM");
  8. }
  9. ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Terrain de DeathMatch", "DeathMatch 1\nDeathMatch 2", "Aller", "Sortir");
  10. return 1;
  11. }
  12. if(strcmp(cmdtext, "/exit", true) == 0)
  13. {
  14. SendClientMessage(playerid,COLOR_RED,"rez");
  15. if(PlayerInfo[playerid][pDM] == 1 || PlayerInfo[playerid][pDM] == 2)
  16. {
  17. new randSpawn = 0;
  18.  
  19. SetPlayerInterior(playerid,0);
  20. TogglePlayerClock(playerid,0);
  21. gPlayerHasCitySelected[playerid] = 0;
  22. SetPlayerVirtualWorld(playerid, 1);
  23. PlayerInfo[playerid][pDM] = 0;
  24. if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid])
  25. {
  26. randSpawn = random(sizeof(gRandomSpawns_LosSantos));
  27. SetPlayerPos(playerid,
  28. gRandomSpawns_LosSantos[randSpawn][0],
  29. gRandomSpawns_LosSantos[randSpawn][1],
  30. gRandomSpawns_LosSantos[randSpawn][2]);
  31. SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
  32. }
  33. else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid])
  34. {
  35. randSpawn = random(sizeof(gRandomSpawns_SanFierro));
  36. SetPlayerPos(playerid,
  37. gRandomSpawns_SanFierro[randSpawn][0],
  38. gRandomSpawns_SanFierro[randSpawn][1],
  39. gRandomSpawns_SanFierro[randSpawn][2]);
  40. SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
  41. }
  42. else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid])
  43. {
  44. randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
  45. SetPlayerPos(playerid,
  46. gRandomSpawns_LasVenturas[randSpawn][0],
  47. gRandomSpawns_LasVenturas[randSpawn][1],
  48. gRandomSpawns_LasVenturas[randSpawn][2]);
  49. SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
  50. }
  51. return 1;
  52. }
  53. else
  54. {
  55. SendClientMessage(playerid,COLOR_RED,"Vous n'êtes pas dans un deathmatch !");
  56. return 1;
  57. }
  58. }
  59. return 1;
  60. }
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement