Jump to content
  • 0

Permisie


Sealand123

Question

Problemă întâlnită (descriere):Cum fac ca o masina de job sa fie luata doar de playerii care au jobul respectiv sau cum fac ca o poarta sa fie deschisa doar de proprietar?
Ero(area / rile) / warning-(ul / urile):nu cred ca e nevoie
Liniile de cod / sursa / script-ul:nu cred ca e nevoie
Imagini / Video (optional):
Aţi încercat să rezolvaţi singur?:da....

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

La OnPlayerStateChange pune:

if (GetVehicleModel(GetPlayerVehicleID(playerid)) == ID masina)// scri idul masinii
{
if (PlayerInfo[playerid][Job] == 0)
{
if (newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER) // verifica daca playerul intra in masina ca sofer sau ca pasager
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFF4444FF, "Nu ai voie sa intri in aceasta masina");
}
}
else if (PlayerInfo[playerid][Job] == ID Job)// setezi idul jobului
{
if (newstate == PLAYER_STATE_DRIVER) // verifica daca playerul a intrat in masina ca sofer.
{
SendClientMessage(playerid, 0xFF4444FF, "Ai intrat in masina de job...");
}
}
}
return 1;
}
  • Upvote 1

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.