05.08.2011, 09:27
pawn Код:
new EngineStatus[MAX_VEHICLES];
public SetEngine(vehicleid) {
new engine,lights,alarm,doors,bonnet,boot,objective;
if(EngineStatus[vehicle]) {
EngineStatus[vehicle] = 0;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
} else {
EngineStatus[vehicle] = 1;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
}
return 1;
}
CMD:engine(playerid, params[]) {
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /car engine");
if(strcmp(params, "engine", true) == 0) {
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be inside of a vehicle to use this command.");
switch(EngineStatus[GetPlayerVehicleID(playerid)]) {
case 0: SendClientMessage(playerid, COLOR_WHITE, "You have turned on your engine.");
case 1: SendClientMessage(playerid, COLOR_WHITE, "You have turned off your engine.");
}
SetEngine(GetPlayerVehicleID(playerid));
}
return 1;
}
Код:
E:\Server SA-MP OPEN BETA(ary)1ab\filterscripts\h-rental.pwn(83) : error 017: undefined symbol "vehicleid" E:\Server SA-MP OPEN BETA(ary)1ab\filterscripts\h-rental.pwn(97) : error 017: undefined symbol "vehicleid"
pawn Код:
EngineStatus[vehicleid] = 1;
pawn Код:
EngineStatus[vehicleid] = 1;