13.08.2016, 10:14
Quote:
|
Return after the loop, after the message that isn't displayed. Also if the very first vehicle in the list isn't owned by you then the loop will just stop on the first iteration and the only thing you will see is the first horizontal rule and nothing else.
|
My code right now:
PHP код:
else if(!strcmp(tmp, "list", true, 5))
{
new iBigStr[386];
SendClientMessage(playerid, -1, "{3696EB}________________________________________________________________________");
SendClientMessage(playerid, -1, sprintf("{D4D4D4}[VEHICLES] {ffffff}%s{D4D4D4}'s vehicles: ",Name(playerid)));
for(new i = 1; i < sizeof(Vehicle); i++)
{
if(!strcmp(Vehicle[i][vOwner], Name(playerid), false))
{
new zone[ 80 ], Float:vipos[3], lockstr[10];
if(Vehicle[i][tmplocked]) myStrcpy(lockstr, "Yes");
else myStrcpy(lockstr, "No");
GetVehiclePos(i, vipos[0], vipos[1], vipos[2]);
GetZone(vipos[0], vipos[1], vipos[2], zone);
format(iBigStr, sizeof(iBigStr), "{bebaba}(ID %d) {51983e}%s [Location: {bebaba}%s{51983e}] [Locked: {bebaba}%s{51983e}]", i, GetVehicleName(i), zone, lockstr);
SendClientMessage(playerid, -1, iBigStr);
}
}
SendClientMessage(playerid, -1, "{3696EB}________________________________________________________________");
}


