Getting information from a lisitem
#5

From my point of view you need something like this

pawn Код:
#define MAX_CUSTOMER (50) // 50 is Max for calling taxies per player
#define DIALOG_CUSTOMERMAIN (1) // List for Players call for Taxi
#define DIALOG_CUSTOMERCONFIRM (2) // confirmation for acxeptong player taxi call

Enum rsCustomer
{
rsUsed,
rsName[MAX_PLAYER_NAME],  // Store the Player Name
rsID,
rsLocation[64],
rsTime
};
New RSInfo[MAX_CUSTOMER][rsCustomer];


//When player call for a taxi store his info
Cmd:taxi(playerid) {
For(new x = 0; x< MAX_CUSTOMER; x++) {
{
New name[MAX_PLAYER_NAME], string[128];
 If(!RSInfo[x][rsUsed]) { //check if the id isnt used
GetPlayerName(playerid, name, sizeof(name));
 // use strlen for storing a name of playerid, :3 not fammilar the syntax
RSInfo[x][rsID] = playerid;
RSInfo[x][rsUsed] = 1;
RSInfo[x][rsTime] = 60; //60 seconds if u use 1000 ms timer golbal or any
//store thelocation of a playerid store it under rsinfo[x][rsLocation]
Break; // wee only justneed one forthis
}
}
}
Return 1;
}
Just a sample code giving you an idea icant give.youwhat im thinking right now im on mobile:/


Then if Taxi take on tha list
Loop the Customernlist that i made a while ago
Then use the VAriables that has been stored whwn player call a taxi
Reply


Messages In This Thread
Getting information from a lisitem - by Luis- - 06.05.2015, 22:43
Re: Getting information from a lisitem - by SickAttack - 06.05.2015, 22:51
Re: Getting information from a lisitem - by Sellize - 07.05.2015, 07:00
Re: Getting information from a lisitem - by Vince - 07.05.2015, 08:09
Re: Getting information from a lisitem - by ToiletDuck - 07.05.2015, 11:12
Re: Getting information from a lisitem - by Konstantinos - 07.05.2015, 11:54
Re: Getting information from a lisitem - by MP2 - 07.05.2015, 12:08
AW: Getting information from a lisitem - by Mencent - 07.05.2015, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)