SA-MP Forums Archive
Rent system doesn't work. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Rent system doesn't work. (/showthread.php?tid=233737)



Rent system doesn't work. - pantelimonfl - 02.03.2011

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.


Re: Rent system doesn't work. - CyNiC - 02.03.2011

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



Re: Rent system doesn't work. - pantelimonfl - 02.03.2011

It doesn't work.


Re: Rent system doesn't work. - pantelimonfl - 02.03.2011

Up..


Re: Rent system doesn't work. - pantelimonfl - 03.03.2011

Bump help me please.


Re: Rent system doesn't work. - pantelimonfl - 03.03.2011

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


Re: Rent system doesn't work. - Markx - 03.03.2011

stop bumping


Re: Rent system doesn't work. - pantelimonfl - 03.03.2011

I need to bump it because players need it.


Re: Rent system doesn't work. - pantelimonfl - 04.03.2011

bump. Someone f*ckin' help me.