Jump to content

Restrictie Masina.


Jomes.

Recommended Posts

Salut pune la

 

public OnPlayerStateChange(playerid, newstate, oldstate)

 

 

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)//  411 reprezinta infernusul tu pui masinile care le ai la factiune
    {
        if(PlayerInfo[playerid][pMember] != 20 && PlayerInfo[playerid][pLeader] != 20 && PlayerInfo[playerid][pAdminDuty] != 1) // != 20 reprezinta idul factiunii
        {
            if (newstate == PLAYER_STATE_DRIVER) // aici verifica daca e sofer si il da jos din masina daca nu e membru la factiunea 20
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, 0xFF4444FF, "Nu faci parte din L.S.P.D.");
            }
        }
        else if(PlayerInfo[playerid][pMember] == 20 && PlayerInfo[playerid][pLeader] == 20 && PlayerInfo[playerid][pAdminDuty] == 1)
        {
            if (newstate == PLAYER_STATE_DRIVER) // verifica daca playerul a intrat in masina ca sofer.
            {
            }
        }
         return 1;
    }

 

Si tot asa pentru fiecare masina!

http://wiki.sa-mp.com/wiki/Vehicle_Model_ID_List lista masinilor

Bafta

Link to comment
Share on other sites

da asa si este

 

 {
      if (newstate == PLAYER_STATE_DRIVER) // aici verifica daca e sofer si il da jos din masina daca nu e membru la factiunea 20
      {
        RemovePlayerFromVehicle(playerid); Acesta linie inseamna ca nu il lasa sa urce in masina
        SendClientMessage(playerid, 0xFF4444FF, "Nu faci parte din L.S.P.D.");
      }
    }

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.