Advertisement
Guest User

Untitled

a guest
Nov 11th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. new PickupOnline;
  2.  
  3. new JaClicou[500];
  4.  
  5. new Nome[24];
  6.  
  7. new Fala[256];
  8.  
  9. public OnGameModeInit()
  10. {
  11. PickupOnline = CreatePickup(1240,1,2033.80,-1414.60,17.0);
  12. Create3DTextLabel("Pickup Online\nTecle F",0xFF0000AA,2033.80,-1414.60,17.0,10.0,0,0);
  13. return 1;
  14. }
  15.  
  16. public OnPlayerKeyStateChange(playerid)
  17. {
  18. if(newkeys == KEY_SECONDARY_ATTACK)
  19. {
  20. if(!IsPlayerInAnyVehicle(playerid))
  21. {
  22. if(JaClicou[playerid] == 0)
  23. {
  24. if(IsPlayerInRangeOfPoint(playerid,2033.80,-1414.60,17.0))
  25. {
  26. GetPlayerName(playerid,Nome,sizeof(Nome));
  27. format(Fala,sizeof(Fala),"%s recebeu uma Pickup Online.",Nome);
  28. SendClientMessageToAll(0xBFBFBFAA,Fala);
  29. SetPlayerHealth(playerid,100.0);
  30. SetPlayerArmour(playerid,100.0);
  31. JaClicou[playerid] = 1;
  32. SetTimerEx("JaClicouOFF",120000,0,"i",playerid);
  33. SetTimerEx("SavePlayerPos",1000,0,"i",playerid);
  34. return 1;
  35. }
  36. }
  37. else
  38. {
  39. SendClientMessage(playerid,0xBFBFBFAA,"Espere 2 minutos.");
  40. return 1;
  41. }
  42. }
  43. return 1;
  44. }
  45.  
  46. forward JaClicouOFF(playerid);
  47.  
  48. public JaClicouOFF(playerid)
  49. {
  50. SendClientMessage(playerid,0xBFBFBFAA,"Sua pickup online esta liberada. Para receber, va até o Hospital.");
  51. JaClicou[playerid] = 0;
  52. return 1;
  53. }
  54.  
  55. forward SavePlayerPos(playerid)
  56. {
  57. SetPlayerPos(playerid,2033.80,-1414.60,17.0);
  58. return 1;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement