Sziasztok.
Olyan problémám van, hogy felmegyek a szerverre, beszállok egy kocsiba /motor vagy shift és nemtörténik semmi, majd kiszállok és ismét vissza utána a SHIFT-el eltudom indítani a motort de a /motor paranccsal nem.
Ha jár a motor utána már működik a /motor parancs.
Ez miért van?
if(strcmp(cmd, \"/motor\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new newcar;
newcar = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(engineOn[GetPlayerVehicleID(playerid)])
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(IsAnOwnableCar(newcar))
{
if(PlayerInfo[playerid][pPcarkey] == newcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == newcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == newcar) { }
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, \"Nincs kulcsod a járműhöz.\");
return 1;
}
}
if(kerekbilincs[GetPlayerVehicleID(playerid)] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, \"A jármű kerekén kerékbilincs van.\");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(gEngine[playerid] == 1)
{
engineOn[GetPlayerVehicleID(playerid)] = true;
gEngine[playerid] = 0;
format(stringx, sizeof(stringx), \"%s elfordítja a kulcsot majd leállítja a motort.\",sendername);
ProxDetector(30.0, playerid, stringx, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective);
TogglePlayerControllable(playerid, false);
}
else if(gEngine[playerid] == 0)
{
engineOn[GetPlayerVehicleID(playerid)] = false;
TogglePlayerControllable(playerid, true);
PutPlayerInVehicle(playerid, newcar, 0);
SetTimerEx(\"StartingTheVehicle\",3500,0,\"i\",playerid);
format(stringx, sizeof(stringx), \"%s elfordítja a kulcsot majd elindítja a motort.\",sendername);
ProxDetector(30.0, playerid, stringx, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective);
gEngine[playerid] = 1;
}
return 1;
}
}
}
return 1;
}
if(newkeys == KEY_JUMP)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
if(!engineOn[GetPlayerVehicleID(playerid)])
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(IsAnOwnableCar(newcar))
{
if(PlayerInfo[playerid][pPcarkey] == newcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == newcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == newcar) { }
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, \"Nincs kulcsod a járműhöz.\");
return 1;
}
}
if(kerekbilincs[GetPlayerVehicleID(playerid)] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, \"A jármű kerekén kerékbilincs van.\");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(gEngine[playerid] == 0) { return 1; }
engineOn[GetPlayerVehicleID(playerid)] = false;
PutPlayerInVehicle(playerid, newcar, 0);
SetTimerEx(\"StartingTheVehicle\",3500,0,\"i\",playerid);
GameTextForPlayer(playerid, \"~w~~n~~n~~n~~n~Indítod a motort.\",3500,3);
gEngine[playerid] = 1;
return 1;
}
}
}
}