Arrays problem
#2

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;
}
Reply


Messages In This Thread
Arrays problem - by FullCircle - 27.07.2014, 20:34
Re: Arrays problem - by Jefff - 27.07.2014, 20:52
Respuesta: Re: Arrays problem - by FullCircle - 27.07.2014, 21:16

Forum Jump:


Users browsing this thread: 1 Guest(s)