Guest User

dasdasdasdsa

a guest
Sep 2nd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. CMD:nre(playerid, params[])
  2. {
  3. new id,sendername[30],giveplayer[30],string[256];
  4. if(sscanf(params, "u", id))
  5. {
  6. SendClientMessage(playerid, COLOR_ERROR, "Usage: /nre [playerid]");
  7. return 1;
  8. }
  9. else
  10. {
  11. if(IsPlayerConnected(id))
  12. {
  13. if(PlayerInfo[id][pNMessage] == 0) return SendClientMessage(playerid, COLOR_WHITE, "This player doesn't have a question.");
  14. if(HelperDuty[playerid] == 1)
  15. {
  16. GetPlayerName(playerid, sendername, sizeof(sendername));
  17. GetPlayerName(id, giveplayer, sizeof(giveplayer));
  18. PlayerInfo[playerid][pNRE] = id;
  19. PlayerInfo[playerid][pHelpedPlayers]++;
  20. Update(playerid,pHelpedPlayersx);
  21. format(string, sizeof(string), "Question: %s has accepted %s question.",sendername,giveplayer);
  22. ABroadCast(COLOR_ADMCHAT, string,1);
  23. HLChat(COLOR_ADMIN,string);
  24. }
  25. else return SendClientMessage(playerid, COLOR_ERROR, "You are not on helper duty!");
  26. }
  27. else return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated.");
  28. }
  29. return 1;
  30. }
Add Comment
Please, Sign In to add comment