27.07.2014, 20:34
I made 2 variables:
1_ PlayerVCantidad[MAX_PLAYERS] for store the total of player vehicles
2_ PlayerVehicle[MAX_PLAYERS][MAX_PLAYER_VEHICLES] for store playervehicles ids in differents arrays
I put this when player login, but doesn't work, when I use the test command print:
Command:
1_ PlayerVCantidad[MAX_PLAYERS] for store the total of player vehicles
2_ PlayerVehicle[MAX_PLAYERS][MAX_PLAYER_VEHICLES] for store playervehicles ids in differents arrays
I put this when player login, but doesn't work, when I use the test command print:
Quote:
1: 0 2: 0 3: 0 4: 0 5: 0 |
pawn Код:
new vv = 1;
for(new v = 1; v < MAX_VEHICLES; v ++)
{
if(strcmp(NombreJ(playerid), cInformacion[v][cOwner]) == 0) //This check if the player is Owner
{
vv ++
PlayerVehicle[playerid][vv] = v;
PlayerVCantidad[playerid] ++;
}
}
pawn Код:
CMD:TEST(playerid, params[])
{
new string[6];
for(new pv = 1; pv < MAX_PLAYER_VEHICLES; pv ++)
{
format(string, sizeof(string), "%d: %d", pv, PlayerVehicle[playerid][pv]);
SendClientMessage(playerid, -1, string);
}
return 1;
}