Guest User

JeNkStA

a guest
Mar 28th, 2009
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. new NeedsTaxi[MAX_PLAYERS];
  2. new Float:GetLocX, Float:GetLocY, Float:GetLocZ;
  3. new WhoNeedsATaxi;
  4. new SomeOneNeedsATaxi;
  5.  
  6.  
  7.  
  8. if(strcmp(cmdtext, "/taxi", true) == 0)
  9. {
  10. WhoNeedsATaxi = playerid;
  11. SomeOneNeedsATaxi = 1;
  12. NeedsTaxi[playerid] = 1; //the player needs the taxi
  13. GetPlayerPos(playerid,GetLocX,GetLocY,GetLocZ);
  14. for(new i = 0; i < MAX_PLAYERS; i++)
  15. {
  16. if (GetPlayerSkin(i) == 255)
  17. {
  18. new string[128];
  19. new pname[24];
  20. format(string, 128,"[TAXI]: %s needs taxi service. type /accept to do the job",pname);
  21. SendClientMessage(i,COLOR_GREEN,string);
  22. }
  23. }
  24. return 1;
  25. }
  26.  
  27.  
  28.  
  29. if(strcmp(cmdtext, "/accept", true) == 0)
  30. {
  31. if (GetPlayerSkin(playerid) == 255)
  32. {
  33. if(SomeOneNeedsATaxi == 1)
  34. {
  35. WhoNeedsATaxi = 255;
  36. SomeOneNeedsATaxi = 0;
  37. new string[128];
  38. new pname[24];
  39. format(string, 128,"[TAXI]: %s has accepted your call and is on the way!",pname);
  40. SendClientMessage(WhoNeedsTaxi,COLOR_GREEN,string);
  41. SetPlayerCheckpoint(playerid,GetLocX,GetLocY,GetLocZ,2);
  42. GetLocX = 0; GetLocY = 0; GetLocZ = 0;
  43. }
  44. else
  45. {
  46. SendClientMessage(playerid, COLOR_GREEN, "No one called for a taxi");
  47. }
  48. }
  49. else
  50. {
  51. SendClientMessage(playerid,COLOR_LIGHTBLUE, "[!] You are not a taxi driver!");
  52. }
  53. return 1;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment