- 0
Eroare la motorul masinii
-
Similar Content
-
- 0 replies
- 131 views
-
- 7 replies
- 368 views
-
- 1 reply
- 438 views
-
- 1 reply
- 309 views
-
- 3 replies
- 339 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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?
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.