Errors on my rental script.
#4

I've tried updating it like this:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == 2)
    {
        if (oldstate == 1)
        {
            new
                vID = GetPlayerVehicleID(playerid);
            if (IsRentableCar(vID))
            {
                if (!IsRentedCar(vID))
                {
                    new
                        String[128];
                    format(String, 128, "~p~~n~rent cost: ~b~%d~n~~w~type ~b~/rentcar~n~~w~to exit it type~n~~p~/exitrental", RENT_COST);
                    GameTextForPlayer(playerid, String, 30000, 4);
                    SendClientMessage(playerid, -1, "Type {3399CC}/exitrental{FFFFFF} to exit this rental car.");
                    TogglePlayerControllable(playerid, 0);
                }
                else if (IsRentedCar(vID))
                {
                    if (GetPVarInt(playerid, "CarRentID") == vID)
                    {
                        return SendClientMessage(playerid, -1, "{3399CC}Welcome{FFFFFF} to your rented car.");
                    }
                    else if (GetPVarInt(playerid, "CarRentID") != vID)
                    {
                        new
                            String[128];
                        format(String, 128, "This vehicle is rented by: {3399CC}%s{FFFFFF}", RentedBy[vID]);
                        SendClientMessage(playerid, -1, String);
                        SendClientMessage(playerid, -1, "Use {3399CC}/exitrental{FFFFFF} to exit this vehicle.");
                        return 1;
                    }
                }
            }
        }
    }
    return 0;
}
But I still get errors.
Reply


Messages In This Thread
Errors on my rental script. - by Elysian` - 27.11.2012, 15:07
Re: Errors on my rental script. - by Konstantinos - 27.11.2012, 15:11
Re: Errors on my rental script. - by Elysian` - 27.11.2012, 15:14
Re: Errors on my rental script. - by Elysian` - 27.11.2012, 15:21
Re: Errors on my rental script. - by Konstantinos - 27.11.2012, 17:44

Forum Jump:


Users browsing this thread: 2 Guest(s)