Interesting issue..(go have a look please)
#1

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..

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;
}
Everything is fine from this moment..

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;
}
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.
Reply


Messages In This Thread
Interesting issue..(go have a look please) - by trablon - 03.04.2015, 05:59
Re: Interesting issue..(go have a look please) - by CalvinC - 03.04.2015, 08:23
Re: Interesting issue..(go have a look please) - by trablon - 03.04.2015, 11:03

Forum Jump:


Users browsing this thread: 2 Guest(s)