01.06.2016, 20:50
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;
}
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;
}