16.06.2011, 21:15
pawn Код:
COMMAND:cars(playerid, params[])
{
new Count = 0, string[128];
for(new v = 0; v < MAX_OWNED_VEHICLES; v++)
{
if(strmatch(CarData[v][CarOwner], PlayerName(playerid)))
{
Format(string, "%d - %d \n", Count, CarData[v][CarModel]);
Count ++;
}
}
if(Count != 0)
{
ShowPlayerDialog(playerid, 158, DIALOG_STYLE_LIST, "cars", string, "Select", "Cancel");
}else{
ShowPlayerDialog(playerid, 158, DIALOG_STYLE_LIST, "cars", "0 - none", "Select", "Cancel");
}
return 1;
}
0 - 411 //wich is correct
but if i have 2 cars it sais
1 - 411
but i want it to say (when i have 2cars)
0 - 411
1 - 411