Jump to content

[REZOLVAT] problema bike


CosminAK
 Share

Recommended Posts

  • Username : CSORIN
  • Problema întâlnită: deci cand creez o bicicleta pe server si dau restart, dupa cand ma urc in ea nu porneste
  • Detalii despre problemă: folosesc gm-ul lui Cosminak47  
  • Ce ai încercat să faci înainte să postezi?: nimic
  • Cod sursa (recomandat pastebin.com) :  
  • Alte detalii :
Link to comment
Share on other sites

ctrl + a + delete

bicicleta nu ar trebui sa mearga sa fie oprita sau pornita'

 

SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective) 

sau

SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective) 

acel 0 este pentru engine

cauta prin gm poate a pus pe undeva 

 

pe wiki nu scrie daca merge si pe bicilete...

Link to comment
Share on other sites

  • Retired

Fi atent mergi la onplayerstatechange mai exact la ON_PLAYER_STATE_DRIVER cv gen si dupa faci urmatoarea chestie:

Verifici modelul vehiculului in care esti si daca e bike pui engine le 1 si gata iti va merge.

Daca am scris ceva gresit imi cer scuze dar is pe telefon.

 

Link to comment
Share on other sites

 

 

unde MotorVehicul[idv]  reprezinta variabila de pornire a motorului

Adaugi asta in OnPlayerStateChange.

		if(BikesFunc(vid)) {
            TogglePlayerControllable(playerid, 1);
            MotorVehicul[vid] = 1;
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
		    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
		}
function BikesFunc(vid) {
	switch (GetVehicleModel(vid)) {
		case 448, 461, 462, 463, 468, 471, 481, 509, 510, 521, 522, 523, 568, 571, 581, 586: return 1;
	}
	return 0;
}

Functia o pui unde ai restul functiilor / stockurilor.

Probabil la tine este vehicleid, modifica din (vid) in (vehicleid)

Edited by Wildo
Link to comment
Share on other sites

nu stiam de acel bug, adauga acest public in gm si se va rezolva problema.

public OnPlayerStateChange(playerid, newstate, oldstate)
{ 
	new vehicleid = GetPlayerVehicleID(playerid);
	if(IsABike(vehicleid)) 
	{
        vehEngine[vehicleid] = 1;
	    new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
		SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
	}
	return 1;
}

@CSORIN

YouTube Click ::

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...