engine command not working
#3

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
At the top of the script:

pawn Код:
new vehicleenginestatus[MAX_VEHICLES];
Under OnVehicleSpawn(vehicleid)

pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
SetVehicleParamsEx(vehicleid, 0, 0, 0, doors, 0, 0, objective);
vehicleenginestatus[vehicleid] = 0;
return 1;
Change "engineon" to just "engine" and delete "engineoff" if you have one because this will do both in one command. Under the engine command:

pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
new vehid = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle.");
if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Yoi are not the driver.");
if(vehicleenginestatus(vehid) == 0) { vehicleenginestatus[vehid] = 1; GetVehicleParamsEx(vehid,  engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehid, 1, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid 0xFFFFFFFF, "Engine has been switched on."); return 1; }
else { vehicleenginestatus[vehid] = 0; GetVehicleParamsEx(vehid,  engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehid, 0, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid 0xFFFFFFFF, "Engine has been switched off."); return 1; }
PS: Scripted from my iPhone so there might be that slight spelling error .
Im getting some errors and I dont know how to fix it because im not figuring out wich ones are they.


Код:
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(4) : error 017: undefined symbol "MAX_VEHICLES"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(4) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(29) : warning 217: loose indentation
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(477) : warning 203: symbol is never used: "boot"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(477) : warning 203: symbol is never used: "bonnet"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(477) : warning 203: symbol is never used: "alarm"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(477) : warning 203: symbol is never used: "lights"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(477) : warning 203: symbol is never used: "engine"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(541) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(541) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(541) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(541) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(541) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply


Messages In This Thread
engine command not working - by Strapz - 28.08.2013, 22:17
Re: engine command not working - by DanishHaq - 29.08.2013, 01:56
Re: engine command not working - by Strapz - 29.08.2013, 10:12
Re: engine command not working - by DanishHaq - 29.08.2013, 12:26
Re: engine command not working - by Luis- - 29.08.2013, 12:29
Re: engine command not working - by DanishHaq - 29.08.2013, 12:36

Forum Jump:


Users browsing this thread: 1 Guest(s)