Jump to content
  • 0

Problema lock/unlock detinator masina


Ruthless

Question

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.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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