Simple CMD problem. +rep who helps me. -
LuckyPlaya` - 28.03.2013
Cant figure out the problem lol...i am watching in it and cant find it
http://pastebin.com/TsVNdM4t
Re: Simple CMD problem. +rep who helps me. -
RenovanZ - 28.03.2013
Try to put
pawn Код:
VehicleLights[MAX_VEHICLES];
on top of your script (under #define)
Re: Simple CMD problem. +rep who helps me. -
LuckyPlaya` - 28.03.2013
When i'we done like you sayd so.
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1317) : error 017: undefined symbol "VehicleLights"
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1317) : warning 215: expression has no effect
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1317) : error 001: expected token: ";", but found "]"
Re: Simple CMD problem. +rep who helps me. -
RenovanZ - 28.03.2013
Give the code of that lines.
Re: Simple CMD problem. +rep who helps me. -
LuckyPlaya` - 28.03.2013
(1317)
if(VehicleLights[vehicleid] == 0)
Re: Simple CMD problem. +rep who helps me. -
RenovanZ - 28.03.2013
Check the code, are you already put it with correct code under your #include or #define ?
pawn Код:
new VehicleLights[MAX_VEHICLES];
Re: Simple CMD problem. +rep who helps me. -
LuckyPlaya` - 28.03.2013
I putted under define VehicleLights[MAX_VEHICLES]; and deleted, new VehicleLights[MAX_VEHICLES];
-now i putted new VehicleLights[MAX_VEHICLES]; ,tryed to copile it,then 5 error camed out
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(130

: error 001: expected token: "-identifier-", but found "new"
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1316) : error 017: undefined symbol "vehicleid"
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1317) : error 017: undefined symbol "VehicleLights"
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1317) : error 017: undefined symbol "vehicleid"
D:\Users\ROBERT\Desktop\-Exclusive Gaming RolePlay 0.3x-\filterscripts\Dealer.pwn(1317) : error 029: invalid expression, assumed zero
(131

new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
(1316) vehicleid = GetPlayerVehicleID(playerid);
(1317) (3x) if(VehicleLights[vehicleid] == 0)
Re: Simple CMD problem. +rep who helps me. - Patrick - 28.03.2013
i didn't test this. this maybe works maybe won't but give it a try
CODE
pawn Код:
CMD:lights(playerid, params[])
{
new VehicleLights[MAX_VEHICLES], engine, lights, alarm, doors, bonnet, boot, objective;
new vehicleid = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You are not in a vehicle.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_WHITE, "Only Drivers can turn on/off the lights");
if(!VehicleLights[vehicleid])
{
VehicleLights[vehicleid] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Lights turned on.");
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
} else {
VehicleLights[vehicleid] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Lights turned off.");
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
}
return 1;
}
PS: i re-do your code. and do my version when i script.
Re: Simple CMD problem. +rep who helps me. -
LuckyPlaya` - 28.03.2013
pds2012 - works
But when i do /lights it says that message lights turned on,and when i am in vehicle lights are off..and when i get out of vehicle,lights get on
-How can i fix that,i use that command in FS for dealership,maybe i have to change something in my Real script
Re: Simple CMD problem. +rep who helps me. - Patrick - 28.03.2013
try my code above. i edited it. hope that works.