03.04.2015, 05:59
Okay guys, i have a problem in my gamemode.
For example;
I'm trying to show information about variables of a player in a dialog..
Everything is fine from this moment..
Now, i want to show info for player.
From this moment, everything is good.But what i want is: when a cop gives his second ticket to a player, player must see his first and second or more tickets in the /mytickets command.
Waiting for a response for it.
For example;
I'm trying to show information about variables of a player in a dialog..
pawn Код:
CMD:ticket(playerid, params[])
{
new id,value,string[256],reasona[256];
if(pInfo[playerid][cop] != 1) return SCM(playerid,COLOR_LIGHTRED,"You are not a cop.");
if(sscanf(params, "uds[256]", id,value,reasona)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /ticket [Player ID/Player Name] [Value] [Reason]");
if(!ProxDetectorS(5.0, playerid, id)) { return SCM(playerid,COLOR_LIGHTRED,"* You have to be close to player."); }
pInfo[id][ticketvalue] += value;
pInfo[id][reason] = reasona;
return 1;
}
Now, i want to show info for player.
pawn Код:
CMD:mytickets(playerid, params[])
{
new tickett[256];
format(tickett,sizeof(tickett),"Ticket Value: %d\tTicket Reason:%s",pInfo[playerid][ticketvalue],pInfo[playerid][reason]);
Dialog_Show(id, tickett, DIALOG_STYLE_MSGBOX, "My Tickets", tickett, "OK", "");
return 1;
}
Waiting for a response for it.