Guten Abend ich hab mir das Motorsystem hier ma rein gebaut aber bekomme Errors Kann mir dabei jemand helfen?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_NO) && !(oldkeys & KEY_NO))//deine belegung
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new veh = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
if(Motor[veh] == 0)
{
SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,Rot,"Motor angeschaltet!");
Motor[veh] = 1;
}
else
{
SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,Grün,"Motor ausgeschaltet!");
Motor[veh] = 0;
return 1;
}
}
return 1;
}
if ((newkeys==KEY_FIRE)) {
if(IsPlayerInArea(playerid,1120.99, -951.5297, 1349.16, -837.0452)) {
SendClientMessage(playerid,0xFFFF00AA,"Du wurdest 5sek wegen DM gefreezt.");
TogglePlayerControllable(playerid, 0);
SetTimerEx("DmUnfreeze", 5000, 0, "i", playerid);
}
}
return 1;
}
stock IsPlayerInArea(playerid,Float:minX,Float:minY,Float:maxX,Float:maxY)
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
if(pX >= minX && pX <= maxX && pY >= minY && pY <= maxY) return 1;
else return 0;
}
ERRORS:
C:\Users\Marcel\Desktop\gm.pwn(39647) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Marcel\Desktop\gm.pwn(39650) : error 017: undefined symbol "Motor"
C:\Users\Marcel\Desktop\gm.pwn(39650) : warning 215: expression has no effect
C:\Users\Marcel\Desktop\gm.pwn(39650) : error 001: expected token: ";", but found "]"
C:\Users\Marcel\Desktop\gm.pwn(39650) : error 029: invalid expression, assumed zero
C:\Users\Marcel\Desktop\gm.pwn(39650) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
mfg hunter