Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. CMD:ticket(playerid,params[]) {
  2. if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti politist.");
  3. if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda!");
  4. if(OnDuty[playerid] != 1) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu esti la datorie!");
  5. new id,string[128];
  6. if(sscanf(params, "u",id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/ticket <playerid/name>");
  7. if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
  8. if(!ProxDetectorS(8.0, playerid, id)) return SendClientMessage(playerid, -1, "Acel player nu este langa tine.");
  9. if(IsACop(id)) return SendClientMessage(playerid, COLOR_GREY, "Nu poti da amenda unui politist!");
  10. new szDialog[1000], title[100];
  11. format(title, 100, "Ticket > %s", GetName(id));
  12. for(new i = 0; i < 7; i++) {
  13. format(string, sizeof(string), "%s ($%d)\n", ticketName(i), ticketValue(i));
  14. strcat(szDialog, string);
  15. }
  16. ShowPlayerDialog(playerid, DIALOG_TICKET, DIALOG_STYLE_LIST, title, szDialog, "Ok", "Cancel");
  17. SetPVarInt(playerid, "userID", id);
  18. return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement