- 0
Erori pawno (/engine)
-
Similar Content
-
- 3 replies
- 142 views
-
- 2 replies
- 48 views
-
- 5 replies
- 1,306 views
-
- 5 answers
- 138 views
-
- 1 answer
- 96 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
NuamNume
Help pls
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(playerInfo[playerid][pFlyLicense] == 0 && isPlane(GetPlayerVehicleID(playerid)))
{
sendPlayerError(playerid, "Nu ai licenta de pilot.");
ClearAnimations(playerid);
return true;
}
if(playerInfo[playerid][pBoatLicense] == 0 && isBoat(GetPlayerVehicleID(playerid)))
{
sendPlayerError(playerid, "Nu ai licenta de navigatie.");
ClearAnimations(playerid);
return true;
}
if(playerInfo[playerid][pDrivingLicense] == 0 && !isBike(GetPlayerVehicleID(playerid)) && !isBoat(GetPlayerVehicleID(playerid)) && !isPlane(GetPlayerVehicleID(playerid)) && GetPlayerVehicleID(playerid) != playerInfo[playerid][pExamenVehicle])
{
sendPlayerError(playerid, "Nu ai licenta de condus.");
ClearAnimations(playerid);
return true;
}
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
if[vehicle_engine[GetPlayerVehicleID(playerid)])
SetVehicleParamsEx(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
if(isBike(GetPlayerVehicleID(playerid)))
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
vehicle_engine[GetPlayerVehicleID(playerid)] = true;
}
}
if(newstate == PLAYER_STATE_ONFOOT || oldstate == PLAYER_STATE_DRIVER)
{
if(IsValidVehicle(playerInfo[playerid][pExamenVehicle]))
examenFail(playerid);
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_LOOK_BEHIND))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || !isBike(GetPlayerVehicleID(playerid)) || GetPVarInt(playerid, "engineDeelay") != gettime())
{
Command_ReProcess(playerid, "engine", false);
}
}
if(PRESSED(KEY_ACTION))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || !isBike(GetPlayerVehicleID(playerid)) || !isBoat(GetPlayerVehicleID(playerid)) || !isPlane(GetPlayerVehicleID(playerid)))
{
Command_ReProcess(playerid, "lights", false);
}
}
if(PRESSED(KEY_ANALOG_DOWN))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || !isBike(GetPlayerVehicleID(playerid)) || !isBoat(GetPlayerVehicleID(playerid)) || !isPlane(GetPlayerVehicleID(playerid)))
{
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, objective);
return true;
}
vehicle_boot[GetPlayerVehicleID(playerid)] = true;
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, objective);
return true;
}
}
if(PRESSED(KEY_ANALOG_UP))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || !isbike(GetPlayerVehicleID(playerid)) || !isBoat(GetPlayerVehicleID(playerid)) || !isPlane(GetPlayerVehicleID(playerid)))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
if(vehicle_bonnet[GetPlayerVehicleID(playerid)]) == true)
{
vehicle_bonnet[GetPlayerVehicleID(playerid)] = false;
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, objective);
return true;
}
vehicle_bonnet[GetPlayerVehicleID(playerid)] = true;
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_ON, objective)
}
}
return 1;
}
Erori:
C:\Users\Raul\Desktop\Tuts GM\pawno\include\callbacks.inc(865) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\Raul\Desktop\Tuts GM\pawno\include\callbacks.inc(866) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Raul\Desktop\Tuts GM\gamemodes\Tuts.pwn(704) : error 017: undefined symbol "engine"
C:\Users\Raul\Desktop\Tuts GM\gamemodes\Tuts.pwn(705) : error 017: undefined symbol "lights"
C:\Users\Raul\Desktop\Tuts GM\gamemodes\Tuts.pwn(706) : error 029: invalid expression, assumed zero
C:\Users\Raul\Desktop\Tuts GM\gamemodes\Tuts.pwn(706) : error 001: expected token: ";", but found ")"
C:\Users\Raul\Desktop\Tuts GM\gamemodes\Tuts.pwn(706) : error 029: invalid expression, assumed zero
C:\Users\Raul\Desktop\Tuts GM\gamemodes\Tuts.pwn(706) : fatal error 107: too many error messages on one line
Compilation aborted.
Pawn compiler 3.10.8 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
[Finished in 2.4s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'C:\\Users\\Raul\\Desktop\\Tuts GM\\gamemodes\\Tuts.pwn', '-;+']]
[dir: C:\Users\Raul\Desktop\Tuts GM\gamemodes]
[path: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\]
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.