Carlock problem
#1

Hello!

I have a problem with my carlock system. If you lock the car and a new player connect to the server, or
you drive a litte around the car is unlocked for other players.

Код:
else if (strcmp("/carlock", cmd, true, 10) == 0)
    {
        if (Carlist[playerid][Typ]!=-1)
        {
            if (Carlist[playerid][Carid]!=-1)
            {
                if (Carlist[playerid][Lock]==0)
                {
                    Carlist[playerid][Lock]=1;
                    CarLocked[carid]=1;
                    SetVehicleParamsForAll(Carlist[playerid][Carid],0,1);
                    PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
                    GameTextForPlayer(playerid, "~w~Fahrzeug ~r~Abgeschlossen", 5000, 6);
                }
                else
                {
                    Carlist[playerid][Lock]=0;
                    CarLocked[carid]=0;
                    SetVehicleParamsForAll(Carlist[playerid][Carid],0,0);
                    PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
                    GameTextForPlayer(playerid, "~w~Fahrzeug ~g~Aufgeschlossen", 5000, 6);
                }
            }
            else { SendClientMessage(playerid, COLOR_GREY, "Du besitzt zur Zeit kein Auto!"); }
        }
        else { SendClientMessage(playerid, COLOR_GREY, "Du besitzt kein Auto!"); }
        return 1;
    }
I know that onvehicle stram in is missing.. i tryed a lot but nothing worked yet.

I hope someone can help me

Best regards
Reply


Messages In This Thread
Carlock problem - by Kalli749 - 05.09.2011, 18:11
Re: Carlock problem - by =WoR=Varth - 05.09.2011, 18:58
AW: Carlock problem - by Kalli749 - 06.09.2011, 13:49
Re: Carlock problem - by Kaperstone - 06.09.2011, 13:58
AW: Carlock problem - by Kalli749 - 06.09.2011, 15:21
Re: AW: Carlock problem - by Kaperstone - 06.09.2011, 15:25
Re: AW: Carlock problem - by Jack_Leslie - 06.09.2011, 15:25
AW: Carlock problem - by Kalli749 - 06.09.2011, 15:29
Re: AW: Carlock problem - by Jack_Leslie - 06.09.2011, 15:33
Re: AW: Carlock problem - by Kaperstone - 06.09.2011, 15:38

Forum Jump:


Users browsing this thread: 4 Guest(s)