Help Gm
#1

i put a new gm when i go in the car the driver can only move his wheels right and left i got no /engine cmd please help!
Reply
#2

Show the code?
Reply
#3

whole gm??i got no /engine code..
Reply
#4

Whole code yes
Or maybe only OnPlayerEnterVehicle();
Reply
#5

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	new string[256];
   	new plname[MAX_PLAYER_NAME];
   	GetPlayerName(playerid, plname, sizeof(plname));
   	format(string, sizeof(string), "%s a intrat in vehicul.", plname);
   	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	if(gTeam[playerid] >= 1||gTeam[playerid] >= 3||gTeam[playerid] >= 4)
	{
		if (IsACopCar(vehicleid) && !ispassenger)
		{
			if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {}
		    else {
				WantedPoints[playerid]+=2;
				SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
				new Float:cx, Float:cy, Float:cz;
				GetPlayerPos(playerid, cx, cy, cz);
				SetPlayerPos(playerid, cx,  cy, cz);
				new wanted = GetPlayerWantedLevel(playerid);
        		SetPlayerWantedLevel(playerid, wanted + 1);
			}
		}
		if (IsAnAmbulance(vehicleid) && !ispassenger)
		{
		    if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
		    else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
		}
	}
	return 1;
}
somebody help??
Reply
#6

i found problem

ManualVehicleEngineAndLights();
this was at Ongamemodeinit this makes the lights go daytime and nighttime. and then i cant drive car.

should i put like this?
ManualVehicleEngineAndLights(2);
??
Reply
#7

no, make a /engine command

Very simple

pawn Код:
new carengine[MAX_VEHICLES];
on top of ur script/\/\/\

pawn Код:
CMD:engine(playerid, param[])
{
    new vid = GetPlayerVehicleID(playerid);
    if(carengine[vid] == 1)
    {
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vid,false,lights,alarm,doors,bonnet,boot,objective);
        carengine[vid] = 0;
    }
    else
    {
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vid,true,lights,alarm,doors,bonnet,boot,objective);
        carengine[vid] = 1;
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by milanosie
Посмотреть сообщение
no, make a /engine command

Very simple

pawn Код:
new carengine[MAX_VEHICLES];
on top of ur script/\/\/\

pawn Код:
CMD:engine(playerid, param[])
{
    new vid = GetPlayerVehicleID(playerid);
    if(carengine[vid] == 1)
    {
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vid,false,lights,alarm,doors,bonnet,boot,objective);
        carengine[vid] = 0;
    }
    else
    {
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vid,true,lights,alarm,doors,bonnet,boot,objective);
        carengine[vid] = 1;
    }
    return 1;
}
i put it like this in my pwn. ??
Reply
#9

solved thank you! u got rep!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)