Rent system doesn't work.
#1

I have this codes. But when i enter a bike it doesn't anything.
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);
            }
        }
And bike's faction is setted to 20.
Reply
#2

Change for:
pawn Код:
public IsARentBike(carid)
{
    for(new i = 0; i < sizeof CarInfo; i++)
    {
        if(carid == CarInfo[i][20])  return 1;
    }
    return 0;
}
Reply
#3

It doesn't work.
Reply
#4

Up..
Reply
#5

Bump help me please.
Reply
#6

C'mon guys. I need this for my server. The players are waiting.
Reply
#7

stop bumping
Reply
#8

I need to bump it because players need it.
Reply
#9

bump. Someone f*ckin' help me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)