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