Jump to content
  • 0

Problema lock/unlock detinator masina


Question

Posted

Va salut,o scurta intrebare si problema oarecum.

Un jucator cand cumpara o masina , la fel si cel care o cumpara din DealerShip ,inainte sa se urce in masina trebuie neaparat sa dea unlock(N) sa se poata urca in ea.Cum as putea sa fac daca esti detinatorul masinii sa nu trebuiasca sa dai lock unlock tot timpul.Sa tina cont ca daca esti detinatorul masinii sa poti urca chiar daca este locked.

1 answer to this question

Recommended Posts

  • 0
Posted

Trebuie sa faci o verificare, care sa vada daca detinatorul masinii `userid` este egal cu ID-ul jucatorului din baza de date `SQLID`, de ex.:

new car_id = FindSpawnID(vehicle_id);
if(C_DATA[car_id][user_id] = P_DATA[playerid][SQLID] {

	SendClientMessage(playerid, -1, "Acest vehicul iti apartine.");

}

P.S.: asta e doar un exemplu.

  • Thanks 1

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...

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.