Need Code
#1

I made my rent system and everything works fine.
I just have a little problem:
"I rent vehicle than enter and left,and it says that i didn't rented that vehicle".

Here's @ONPLAYERSTATECHANGE:

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    new 
Vozilo GetPlayerVehicleID(playerid);
    {
        if(
newstate == PLAYER_STATE_DRIVER && Vozilo == Rent[0] || Vozilo == Rent[1] || Vozilo == Rent[2] || Vozilo == Rent[3] || Vozilo == Rent[4] || Vozilo == Rent[5] || Vozilo == Rent[6] || Vozilo == Rent[7])
        {
            if(
Rentano[playerid] != 0) return SendClientMessage(playerid,-1,""COLOR_CRVENA"Greska:{FFFFFF} Vozilo je vec iznajmljeno") && RemovePlayerFromVehicle(playerid);
            {
                
ShowPlayerDialog(playerid,DIALOG_RENT,DIALOG_STYLE_LIST,""COLOR_ZUTA"Rent Vozila","{FFFFFF} ** "COLOR_SIVA"5 {FFFFFF}minuta\n** "COLOR_SIVA"15 {FFFFFF} minuta\n** "COLOR_SIVA"30 {FFFFFF} minuta","Iznajmi","Izlaz");
                
TogglePlayerControllable(playerid,0);
            }
        }
        return 
1;
    }

You can see "if(Rentano[playerid] != 0)". I am using that to check if that vehicle is rented or not. But i would like to ignore it when is rented ? :=
Reply


Messages In This Thread
Need Code - by NoDi522 - 09.04.2015, 10:00
Re: Need Code - by JeaSon - 09.04.2015, 10:05
Re: Need Code - by NoDi522 - 09.04.2015, 10:10
Re: Need Code - by NoDi522 - 09.04.2015, 11:09
Re: Need Code - by NoDi522 - 09.04.2015, 12:41
AW: Need Code - by Mencent - 09.04.2015, 12:51
Re: Need Code - by NoDi522 - 09.04.2015, 12:54
Re: Need Code - by [ABK]Antonio - 09.04.2015, 12:58
Re: Need Code - by NoDi522 - 09.04.2015, 13:00
Re: Need Code - by R0 - 09.04.2015, 13:10

Forum Jump:


Users browsing this thread: 3 Guest(s)