unguru2009

Reporter..

Feb 27th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. CMD:live(playerid, params[])
  2. {
  3. new id, szPlayerName2[MAX_PLAYER_NAME];
  4. if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /live <playerid>");
  5. if(playerVariables[playerid][pGroup] == 3)
  6. {
  7. if(id != INVALID_PLAYER_ID)
  8. {
  9. if(id != playerid)
  10. {
  11. if(playerVariables[id][pLive] == 0)
  12. {
  13. if(IsPlayerInRangeOfPlayer(playerid, id, 10.0))
  14. {
  15. if(playerVariables[id][pGroup] != 3)
  16. {
  17. playerVariables[playerid][pLive] = 1;
  18. playerVariables[id][pLive] = 1;
  19. GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
  20. GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);
  21. format(szMessage, sizeof(szMessage), "You have started the interview with %s.", szPlayerName2);
  22. SCM(playerid, COLOR_LIGHTBLUE, szMessage);
  23. format(szMessage, sizeof(szMessage), "%s has started the interview with you.", szPlayerName);
  24. SCM(id, COLOR_LIGHTBLUE, szMessage);
  25. }
  26. else
  27. {
  28. SCM(playerid, -1, "This player is a reporter!");
  29. }
  30. }
  31. else
  32. {
  33. SCM(playerid, -1, "You are not below the player you wish to start the interview with!");
  34. }
  35. }
  36. return 1;
  37. }
  38. CMD:endlive(playerid, params[])
  39. {
  40. new id, szPlayerName2[MAX_PLAYER_NAME];
  41. if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /live <playerid>");
  42. if(playerVariables[playerid][pGroup] == 3)
  43. {
  44. playerVariables[id][pLive] = 0;
  45. GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
  46. GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);
  47. format(szMessage, sizeof(szMessage), "You have finished the interview with %s.", szPlayerName2);
  48. SCM(playerid, COLOR_LIGHTBLUE, szMessage);
  49. format(szMessage, sizeof(szMessage), "%s has finished the interview with you.", szPlayerName);
  50. SCM(id, COLOR_LIGHTBLUE, szMessage);
  51. }
  52. }
  53. }
  54. else
  55. {
  56. SCM(playerid, -1, "The player you wish to start the interview with is not connected!");
  57. }
  58. }
  59. else
  60. {
  61. SCM(playerid, -1, "You are not a reporter!");
  62. }
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment