02.03.2011, 12:20
I have this codes. But when i enter a bike it doesn't anything.
All the cars are loaded from .cfg
And bike's faction is setted to 20.
All the cars are loaded from .cfg
pawn Код:
public IsARentBike(carid)
{
for(new i = 0; i <MAX_VEHICLES; i++)
{
if(CarInfo[i][cFaction] == 20) return 1;
}
return 0;
}
pawn Код:
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);
}
}