26.04.2013, 15:51
Hey, thanks for answering, but...
My way of trying to do this has changed...although you gave me some great (i thought) ideas.
So my current problem is this:
This always returns -1.
That array is just PlayerInfo[playerid][PVehicle][2]. So if PlayerInfo[playerid][PVehicle][0] is invalid vehicle id it should just return that 0? shoudn't it?
My way of trying to do this has changed...although you gave me some great (i thought) ideas.
So my current problem is this:
pawn Code:
stock FindEmptyPlayerSlot(playerid)
{
for(new i; i<2; i++)
{
if(PlayerInfo[playerid][PVehicle][i] == INVALID_VEHICLE_ID)
{
return i;
}
}
return -1;
}
That array is just PlayerInfo[playerid][PVehicle][2]. So if PlayerInfo[playerid][PVehicle][0] is invalid vehicle id it should just return that 0? shoudn't it?