Stupid Error :/
#6

As I thought, RentCars is an array, you can't just compare it like that, plus I see nothing in your code where the actual vehicle ID is defined. Your code makes no absolutely sense. And I just want to add, this isn't a "stupid error", it's called proper scripting.

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
pawn Код:
IsRentCar(vehicleid)
{
    for(new i=0; i < sizeof(RentCars); i++)
    {
        if(RentCars[i] == vehicleid)
        {
            return 1;
        }
    }
    return 0;
}
Use this function and it should work.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (IsRentCar(vehicleid))
    {
        GameTextForPlayer(playerid, "This Vehicle is For Rent, Type /rentcar to rent it", 3000, 4);
    }
    return 1;
}
Did you bother looking at his 2d array?
Reply


Messages In This Thread
Stupid Error :/ - by Luis- - 15.10.2010, 14:41
Re: Stupid Error :/ - by kurta999 - 15.10.2010, 14:45
Re: Stupid Error :/ - by Calgon - 15.10.2010, 14:46
Re: Stupid Error :/ - by Luis- - 15.10.2010, 14:46
Re: Stupid Error :/ - by MadeMan - 15.10.2010, 14:47
Re: Stupid Error :/ - by Calgon - 15.10.2010, 14:48
Re: Stupid Error :/ - by Luis- - 15.10.2010, 14:50

Forum Jump:


Users browsing this thread: 1 Guest(s)