Advertisement
Guest User

Untitled

a guest
Dec 26th, 2011
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new gTeam[MAX_PLAYERS];
  4.  
  5. new PointTimer;
  6. new LeaveTimer;
  7.  
  8. forward IsPlayerInPoint(playerid);
  9. forward LeavePlayerRadius(playerid);
  10.  
  11. #define Weiß 0xFFFFFFFF
  12. #define TEAM_TERROR 1
  13.  
  14. public IsPlayerInPoint(playerid)
  15. {
  16. //Hier kommt das rein was nach 2 Minuten passieren soll!
  17. GivePlayerWeapon(playerid,35,10);
  18. return 1;
  19. }
  20.  
  21. public LeavePlayerRadius(playerid)
  22. {
  23. if(!IsPlayerInRangeOfPoint(playerid, 7.0, 217.0114, 1822.8719, 6.4141))
  24. {
  25. KillTimer(PointTimer);
  26. KillTimer(LeaveTimer);
  27. SendClientMessageToAll(Weiß, "C4 klau ist gescheitert.");
  28. return 1;
  29. }
  30. return 1;
  31. }
  32.  
  33. public OnPlayerCommandText(playerid, cmdtext[])
  34. {
  35. if (strcmp("/C4", cmdtext, true, 10) == 0)
  36. {
  37. if(gTeam[playerid] == TEAM_TERROR)
  38. {
  39. if(IsPlayerInRangeOfPoint(playerid, 7.0, 217.0114, 1822.8719, 6.4141))
  40. {
  41. PointTimer = SetTimerEx("IsPlayerInPoint", 120000, false, "i", playerid);
  42. LeaveTimer = SetTimerEx("LeavePlayerRadius", 1000, true, "i", playerid);
  43. return 1;
  44. }
  45. SendClientMessage(playerid, Weiß, "Du bist nicht am C4 Point.");
  46. return 1;
  47. }
  48. SendClientMessage(playerid, Weiß, "Du bist kein Terror.");
  49. return 1;
  50. }
  51. return 0;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement