06.10.2018, 23:40
I made this engine function (in a command):
But i'm getting this:
pawn Код:
switch (GetEngineStatus(vehicleid))
{
case false:
{
new rand = random(3);
if(rand != 0)
{
PlayNearbySound(playerid, 11200);
SetPVarInt(playerid,"CmdTime",GetTickCount()+5000);
SetEngineStatus(vehicleid, true);
SendNearbyMessage(playerid, 10.0, COLOR_FACTION, "* %s inserts the key into the ignition lock and starts the engine of %s %s.", ReturnName(playerid, 0), CheckSex(playerid), ReturnVehicleName(vehicleid));
}
else
{
GameTextForPlayer(playerid, "~r~ENGINE COULDN'T STARTED~n~~w~Try it again!", 3000, 4);
}
}
case true:
{
SetPVarInt(playerid,"CmdTime",GetTickCount()+5000);
SetEngineStatus(vehicleid, false);
SendNearbyMessage(playerid, 10.0, COLOR_FACTION, "* %s leaves the key from ignition lock and stops the engine of %s %s.", ReturnName(playerid, 0), CheckSex(playerid), ReturnVehicleName(vehicleid));
}
}
}
Quote:
error 040: duplicate "case" label (value 7) error 040: duplicate "case" label (value 8 ) |