03.04.2011, 15:16
(
Последний раз редактировалось Hornet600; 03.04.2011 в 21:05.
)
Im having problems with enum arrays this is bugs some values of my script.
Ok lets start with enums:
Ok looks all alright but there is a big problem with advanced structures.
One exemple I want to get a player name from the vehicleinfo Owner
so I do:
pid will be the playerid but it bugs because it returns always the id number 0
so if there are two players it will return always to id 0 and not
the correct vehicle owner.
I hope someone knows how to manages arrays well to help me sort this bug out please.
Ok lets start with enums:
pawn Код:
enum users
{
Name[MAX_PLAYER_NAME],
}
new playerinfo[MAX_PLAYERS][users];
enum vInfo
{
Owner[MAX_PLAYER_NAME],
}
new vehicleinfo[MAX_VEHICLES][vInfo];
One exemple I want to get a player name from the vehicleinfo Owner
so I do:
pawn Код:
new pid = GetPlayerID(vehicleinfo[vehicleid][Owner]);
so if there are two players it will return always to id 0 and not
the correct vehicle owner.
I hope someone knows how to manages arrays well to help me sort this bug out please.