Guest User

Untitled

a guest
Nov 21st, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. //oben definiert
  2.  
  3. new Float:LaufPrison[30][3] = {
  4. {1342.1566,2844.5896,10.8203}, //1
  5. {1312.8325,2808.8992,10.8203}, //2
  6. {1325.1770,2751.2815,10.8203}, //3
  7. {1288.6094,2731.3621,10.8250}, //4
  8. {1221.5824,2732.8445,10.8203}, //5
  9. {1224.2797,2785.3169,10.8125}, //6
  10. {1221.4663,2848.8538,10.8423}, //7
  11. {1198.6765,2850.1052,10.8125}, //8
  12. {1212.8397,2815.4832,10.8203}, //9
  13. {1180.3118,2781.7559,10.8203}, //10
  14. {1139.5408,2754.5481,10.8203}, //11
  15. {1138.8292,2730.0659,10.8281}, //12
  16. {1187.1580,2730.4980,10.8281}, //13
  17. {1206.8860,2746.7417,10.8281}, //14
  18. {1226.3585,2768.8430,10.8203}, //15
  19. {1260.1567,2778.7515,10.8203}, //16
  20. {1315.8286,2748.5542,10.8203}, //17
  21. {1355.8480,2762.1765,10.0435}, //18
  22. {1392.8462,2750.6030,10.8203}, //19
  23. {1414.5535,2773.1848,10.8203}, //20
  24. {1414.1232,2813.9175,10.8203}, //21
  25. {1407.1130,2847.2422,10.8203}, //22
  26. {1365.9814,2846.4534,10.8203}, //23
  27. {1344.7213,2828.3940,10.8203}, //24
  28. {1329.5938,2810.9419,10.8203}, //25
  29. {1281.1600,2782.5503,10.8203}, //26
  30. {1236.5809,2809.8193,10.8125}, //27
  31. {1197.3298,2803.3982,10.8203}, //28
  32. {1171.9951,2769.6912,11.2644}, //29
  33. {1172.2249,2734.7974,10.8281} //30
  34. };
  35.  
  36.  
  37.  
  38.  
  39.  
  40. //CommandText
  41.  
  42. if(strcmp(cmd, "/lprison", true) == 0)
  43. {
  44. if(IsPlayerConnected(playerid))
  45. {
  46. tmp = strtok(cmdtext, idx);
  47. if(!strlen(tmp))
  48. {
  49. SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /lprison [playerid/PartOfName] [Checkpoints]");
  50. return 1;
  51. }
  52. new playa;
  53. new checkp;
  54. new rand = random(sizeof(LaufPrison));
  55. playa = ReturnUser(tmp);
  56. tmp = strtok(cmdtext, idx);
  57. checkp = strval(tmp);
  58. if (PlayerInfo[playerid][pAdmin] >= 5)
  59. {
  60. if(IsPlayerConnected(playa))
  61. {
  62. if(playa != INVALID_PLAYER_ID)
  63. {
  64. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  65. GetPlayerName(playerid, sendername, sizeof(sendername));
  66. PlayerInfo[playa][pCheckpoint] = checkp;
  67. format(string, sizeof(string), "* Du hast %s ins Laufprison gesteckt.", giveplayer);
  68. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  69. format(string, sizeof(string), "* Du wurdest vom Admin %s für %d ins Laufprison gesteckt.", sendername, checkp);
  70. SendClientMessage(playa, COLOR_LIGHTRED, string);
  71. SendClientMessage(playa, COLOR_LIGHTRED, "* Laufe nun zu den einzelnen Checkpoints!");
  72. SendClientMessage(playa, COLOR_LIGHTRED, "* Wenn die Alle Checkpoints abgelaufen hast bist du wieder Frei");
  73. ResetPlayerWeapons(playa);
  74. PlayerInfo[playa][pCheckpoint] = checkp;
  75. format(string, sizeof(string), "AdmCmd: %s wurde von dem Admin %s für %d ins Laufprison gesteckt", giveplayer, sendername, checkp);
  76. SendClientMessageToAll(COLOR_RED, string);
  77. SetPlayerPos(playa, 1387.0232,2795.7407,10.5448);
  78. DisablePlayerCheckpoint(playa);
  79. SetPlayerCheckpoint(playa, LaufPrison[rand][0], LaufPrison[rand][1], LaufPrison[rand][2], 6.0);
  80. }
  81. }
  82. }
  83. else
  84. {
  85. SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht berechtigt, diesen Befehl zu benutzen !");
  86. }
  87. }
  88. return 1;
  89.  
  90.  
  91.  
  92.  
  93. /////////////////////des ist unter EnterCheckpoint
  94.  
  95. if(PlayerInfo[playerid][pCheckpoint] > 0)
  96. {
  97. new rand = random(sizeof(LaufPrison));
  98. DisablePlayerCheckpoint(playerid);
  99. SetPlayerCheckpoint(playerid, LaufPrison[rand][0], LaufPrison[rand][1], LaufPrison[rand][2], 6.0);
  100. new checkp = PlayerInfo[playerid][pCheckpoint];
  101. PlayerInfo[playerid][pCheckpoint] = checkp-1;
  102. format(string, sizeof(string), "Du musst noch %d Checkpoints ablaufen", checkp);
  103. SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
  104. }
  105.  
  106. if(PlayerInfo[playerid][pCheckpoint] == 0)
  107. {
  108.  
  109.  
  110. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Du hast alle Checkpoints abgelaufen. Nun bist du Frei!");
  111. GameTextForPlayer(playerid, "~g~Du bist frei", 5000, 3);
  112. SetPlayerVirtualWorld(playerid, 0);
  113. SetPlayerPos(playerid, 91.9112,1920.7303,17.9953);
  114. SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000); //Reset world to player
  115. PlayerInfo[playerid][pDead] = 0;
  116. }
Advertisement
Add Comment
Please, Sign In to add comment