Hallo Leute ich habe ein Problem und zwar habe ich im script den Befehl /motor und / Licht, doch wenn ich in ein Auto einsteige sind Motor und Licht schon an.
Wie behebe ich das kann mir einer behilflich sein?
Hallo Leute ich habe ein Problem und zwar habe ich im script den Befehl /motor und / Licht, doch wenn ich in ein Auto einsteige sind Motor und Licht schon an.
Wie behebe ich das kann mir einer behilflich sein?
Du musst ein Motor/Lichtsystem scripten?
Gruß
Das ist ja schon im Script beinhaltet
Dann musst du halt bei OnVehicleSpawn die Parameter so einstellen, dass der Motor aus ist
Zeig mal bitte deinen Motor Befehl.
Gruß
Motor
if(strcmp(cmd, "/motor",true) == 0)
{
if(IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}Fahrräder haben {FF0000}keinen{FFFFFF} Motor ...");
return 1;
}
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new engine,LIGHTs,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,LIGHTs,alarm,doors,bonnet,boot,objective);
if(vid != INVALID_VEHICLE_ID)
{
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,LIGHTs,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~r~aus!", 2000, 5);
}
else
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,LIGHTs,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~g~an!", 2000, 5);
}
}
return 1;
}
<licht
if(strcmp(cmdtext,"/Licht",true)==0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new engine,LIGHTs,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,LIGHTs,alarm,doors,bonnet,boot,objective);
if(vid != INVALID_VEHICLE_ID)
{
if(LIGHTs == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,COLOR_GREY," t/ ausgeschaltet. ");
}
else
{
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,COLOR_GREY," Licht eingeschaltet.. ");
}
}
return 1;
}
Setz das mal unter OnVehicleSpawn SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,LIGHTs,alarm,doors,bonnet,boot,objective);
Gruß
Dann bekomme ich Errors
Ohne Code und Errors nix los.
Gruß
Function OnVehicleSpawn(vehicleid)
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,LIGHTs,alarm,doors,bonnet,boot,objective);
{
{
Gas[vehicleid] = GetGasMax(vehicleid);
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new x = 0; x < MaxVeh; x++)
{
if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
{
if (vehicleid == PlayerCar[playerid][x][CarId])
{
SetTimerEx("CarTuning",700,0,"ii",playerid,x);
}
}
}
}
return 1;
Errors:
C:\Users\User\Desktop\samp\pawno\include\M_Bot.inc(165) : error 017: undefined symbol "IsAnAdmin"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3618) : error 017: undefined symbol "FRAC_OnPlayerEnterVehicle"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3654) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3664) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3674) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3682) : error 017: undefined symbol "IsAFahrschulVeh"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3695) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3705) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(3715) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4254) : error 017: undefined symbol "OnPlayerCarLogin"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4469) : error 017: undefined symbol "ShowConInfo"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4521) : error 017: undefined symbol "SendIRCMessage"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4543) : error 017: undefined symbol "SendIRCMessage"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4812) : error 017: undefined symbol "OOCOff"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4824) : error 017: undefined symbol "OOCOff"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4844) : error 017: undefined symbol "OOCOff"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4852) : error 017: undefined symbol "OOCOff"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4860) : error 017: undefined symbol "GW_OnPlayerDisconnect"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(4992) : error 017: undefined symbol "RemoveBlitzer"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5007) : error 017: undefined symbol "OnPlayerCarUpdate"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5024) : error 017: undefined symbol "ABroadCast"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5034) : error 017: undefined symbol "ABroadCast"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5063) : error 017: undefined symbol "PlayerUpdate"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5067) : error 017: undefined symbol "Log"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5196) : error 017: undefined symbol "IsPlayerInFrac"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(5209) : error 017: undefined symbol "RemoveRoadblock"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
Klammerfehler
Gruß
Function OnVehicleSpawn(vehicleid)
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,LIGHTs,alarm,doors,bonnet,boot,objective);
Gas[vehicleid] = GetGasMax(vehicleid);
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new x = 0; x < MaxVeh; x++)
{
if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
{
if (vehicleid == PlayerCar[playerid][x][CarId])
{
SetTimerEx("CarTuning",700,0,"ii",playerid,x);
}
}
}
}
return 1;}
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,LIGHTs,alarm,doors,bonnet,boot,objective);
Gas[vehicleid] = GetGasMax(vehicleid);
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new x = 0; x < MaxVeh; x++)
{
if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
{
if (vehicleid == PlayerCar[playerid][x][CarId])
{
SetTimerEx("CarTuning",700,0,"ii",playerid,x);
}
}
}
}
return 1;
}
Kommen dauernd solche Errors:
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17365) : error 017: undefined symbol "vid"
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17383) : error 055: start of function body without function header
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17385) : error 010: invalid function or declaration
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17386) : error 010: invalid function or declaration
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17388) : error 010: invalid function or declaration
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17390) : error 010: invalid function or declaration
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17392) : error 010: invalid function or declaration
C:\Users\User\Desktop\samp\gamemodes\ggr.pwn(17399) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Errors.
Füg das noch darüber: new vid = GetPlayerVehicleID(playerid);
Gruß
Ah hab was anderes gefunden musste nur das machen:
public OnGameModeInit()
{
ManualVehicleEngineAndLights();
}
Aber trotzdem Danke dafür das du mir versucht hast zu helfen