14.05.2011, 19:50
hello im dan i want a command like :/lightson,/lightoff plz can someone help me Only Lights and i want to open them even daytime and tell me where to put it plz
CMD:lights(playerid, params[])
{
SetVehicleParamsEx(vehicleid,engine,1,alarm,doors,bonnet,boot,objective);
return 1;
}
new engine,lights,alarm,doors,bonnet,boot,objective;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lightson", cmdtext, true, 10) == 0)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,1,alarm,doors,bonnet,boot,objective);
return 1;
}
if (strcmp("/lightsoff", cmdtext, true, 10) == 0)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,0,alarm,doors,bonnet,boot,objective);
return 1;
}
return 0;
}