Jump to content
  • 0

pomoc řízení aut


chumpa

Dotaz

Zdravím,do modu SL577 jsem dal,aby hráči nemohli jezdit autama policie,může to řídit jen člen policie.Jenomže si do toho auta nemuže nikdo sednout ani jako spolujedzec,pokud není policajt.Neví někdo co s tím?Předem děkuji za odpověď.

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!IsPlayerNPC(playerid))
    {
      if(IsPlayerConnected(playerid))
        {
            if(GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 432)
            {
                if(Player[playerid][Team] != 16 && Player[playerid][Team] != 24)
                {
                    new bool:IsVehicleAdminVehicle=false;

                    for(new ac=0; ac<Server[A_Vehicles]; ac++)
                    {
                        if(vehicleid == A_Vehicle[ac]) IsVehicleAdminVehicle=true;
                    }

                    if(IsVehicleAdminVehicle == false)
                    {
                        new Float:x, Float:y, Float:z;
                        GetPlayerPos(playerid,x,y,z);
                        SetPlayerPos(playerid,x,y,z);
                        SetPlayerSkin(playerid,GetPlayerSkin(playerid));

                        FormatPlayerInfoBox(playerid,"~g~Info Box","~r~Abys mohl pouzivat tohle vozidlo musis byt bud ~y~Voják~r~ nebo ~y~San Fierro Army~r~!",4000);
                        return 0;
                    }
                }
            }

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0

No to si nemyslím, v OnPlayerEnterVehicle ještě nebude mít State řidiče ale na nohou.

jo sorry uz me hrabe, lepsi vyuzit

ispassenger

v tom publicu

Edited by ĐaVe
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...