Problema la biciclete
#1

Cand ma urc pe o bicicleta.. pur si simplu.. nu se misca.. help ?

if(strcmp(cmd, "/engine", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 510 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 481 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 509)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Bicicletele nu au motor");
return 1;
}
new Vehicle = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(Engine[Vehicle] == 0)
{
GetVehicleParamsEx(Vehicle,engine,lights,alarm,doo rs,bonnet,boot,objective);
SetVehicleParamsEx(Vehicle,VEHICLE_PARAMS_ON,light s,alarm,doors,bonnet,boot,objective);
Engine[Vehicle] = 1;
if(PlayerInfo[playerid][pAdmin] >= 1) TogglePlayerControllable(playerid, 1);
format(string, sizeof(string), "* %s baga cheile in contact si porneste motorul.", sendername);
ProxDetector(30.0, playerid, string, COLOR_MOVO,COLOR_MOVO,COLOR_MOVO,COLOR_MOVO,COLOR_ MOVO);
}
else
{
GetVehicleParamsEx(Vehicle,engine,lights,alarm,doo rs,bonnet,boot,objective);
SetVehicleParamsEx(Vehicle,VEHICLE_PARAMS_OFF,ligh ts,alarm,doors,bonnet,boot,objective);
Engine[Vehicle] = 0;
format(string, sizeof(string), "* %s opreste motorul.", sendername);
ProxDetector(30.0, playerid, string, COLOR_MOVO,COLOR_MOVO,COLOR_MOVO,COLOR_MOVO,COLOR_ MOVO);
}
}
}
return 1;
}
Reply
#2

No Help me ?
Reply
#3

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
	{
	         new vehid=GetPlayerVehicleID(playerid);
    	         if(GetVehicleModel(vehid) == 510 || GetVehicleModel(vehid) == 481 || GetVehicleModel(vehid) == 509)
		 {
		     SetVehicleParamsEx(vehid,1,0,0,0,0,0,0);
		 }
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)