27.07.2014, 20:52
pawn Код:
new vv;
for(new v = 1; v < MAX_VEHICLES; v++)
{
if(cInformacion[v][cOwner][0] != '\0' && strcmp(NombreJ(playerid), cInformacion[v][cOwner]) == 0 && ++vv < MAX_PLAYER_VEHICLES) //This check if the player is Owner
{
PlayerVehicle[playerid][vv] = v;
PlayerVCantidad[playerid]++;
}
}
CMD:test(playerid, params[])
{
if(PlayerVCantidad[playerid] == 0) SendClientMessage(playerid,-1,"No vehicles owned");
else{
new string[10];
for(new pv = 1; pv < PlayerVCantidad[playerid]; pv++)
{
format(string, sizeof(string), "%d: %d", pv, PlayerVehicle[playerid][pv]);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}