28.03.2013, 12:50
Simple CMD problem. +rep who helps me.
28.03.2013, 12:55
Try to put
on top of your script (under #define)
pawn Код:
VehicleLights[MAX_VEHICLES];
28.03.2013, 12:58
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 "]"
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 "]"
28.03.2013, 12:59
Give the code of that lines.
28.03.2013, 13:00
(1317)
if(VehicleLights[vehicleid] == 0)
if(VehicleLights[vehicleid] == 0)
28.03.2013, 13:02
Check the code, are you already put it with correct code under your #include or #define ?
pawn Код:
new VehicleLights[MAX_VEHICLES];
28.03.2013, 13:09
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)
-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)
28.03.2013, 13:16
i didn't test this. this maybe works maybe won't but give it a try
CODE
PS: i re-do your code. and do my version when i script.
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;
}
28.03.2013, 13:23
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
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
28.03.2013, 13:26
try my code above. i edited it. hope that works.
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)