14.03.2012, 12:54
pawn Код:
//Lightbar Lighting CMD
CMD:lightflashonwe(playerid,params[]){// admin
if(GetPVarInt(playerid,"Lights")>0)
{
SetPVarInt(playerid,"Lights",0);
if(IsValidObject(GetPVarInt(playerid,"Siren1")))
{
DestroyObject(GetPVarInt(playerid,"Siren1"));
SendClientMessage(playerid, COLOR_LIGHTBLUE,"[INFO]Lightbar lighting deactivated");
}
if(IsValidObject(GetPVarInt(playerid,"Siren2")))
{
DestroyObject(GetPVarInt(playerid,"Siren2"));
}
}
else
{
SetPVarInt(playerid,"Lights",1);
SetPVarInt(playerid,"OB1",CreateObject(18646,0,0,0,0,0,0,200));
SetPVarInt(playerid,"OB2",CreateObject(18646,0,0,0,0,0,0,200));
AttachObjectToVehicle(GetPVarInt(playerid,"OB1"),GetPlayerVehicleID(playerid),-0.4000,-0.2000,0.8500,0.0000,0.0000,0.0000);
AttachObjectToVehicle(GetPVarInt(playerid,"OB2"),GetPlayerVehicleID(playerid),00.4000,-0.2000,0.8500,0.0000,0.0000,0.0000);
}
return 1;
}