- 0
Eroare la motorul masinii
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
FDH_
Salut. Am postat destul de mult, dar problemele nu se termina. Cu noroc, am avut multe probleme la GM pe care le-am fixat, dar pe asta nu stiu. Am facut un OnPlayerKeyStateChange ca atunci cand apas pe tasta 2, sa se porneasca/opreasca motorul.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(newkeys == KEY_LOOK_BEHIND) { new vID = GetPlayerVehicleID(playerid), tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective; GetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective); if(tmp_engine == 0) { tmp_engine = 1; new Float:x, Float:y, Float:z; new text[128]; GetPlayerPos(playerid, x, y, z); format(text, sizeof(text), "%s a pornit motorul.", GetName(playerid)); if(IsPlayerInRangeOfPoint(playerid, 15, x, y, z)) SendClientMessage(playerid, 0x4E87F2FF, text); } else { tmp_engine = 0; new Float:a, Float:b, Float:c; new string[128]; GetPlayerPos(playerid, a, b, c); format(string, sizeof(string), "%s a oprit motorul.", GetName(playerid)); if(IsPlayerInRangeOfPoint(playerid, 15, a, b, c)) SendClientMessage(playerid, 0x4E87F2FF, string); } SetVehicleParamsEx(vID, tmp_engine, tmp_lights, tmp_alarm, tmp_doors, tmp_bonnet, tmp_boot, tmp_objective); } } return 1; }Sunt incepator, asa am reusit sa fac.
In joc, cand intru intr-o masina si apas pe 2, se opreste motorul si trebuie sa apas din nou pe 2 ca sa il pornesc.
Masina are motorul oprit din start, nu se aude zgomot de la motor si nu merge, de ce imi opreste motorul atunci?
8 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now