07.05.2015, 11:12
(
Последний раз редактировалось ToiletDuck; 07.05.2015 в 12:01.
)
From my point of view you need something like this
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
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;
}
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