05.03.2011, 12:17
I have this code.
and this
I tried even with newcar == 30 (carid) but it doesn't work.
The cars are loaded from cfg file.
pawn Code:
public IsARentBike(carid)
{
for(new i = 0; i <MAX_VEHICLES; i++)
{
if(CarInfo[i][cFaction] == 20) return 1;
}
return 0;
}
pawn Code:
if(IsARentBike(newcar))
{
if (HireCar[playerid] != newcar)
{
format(string, sizeof(string), "~w~You can Rent this bike~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentbike~w~~n~to get out type ~r~/exit",SBizzInfo[0][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
The cars are loaded from cfg file.