cops Posted July 22, 2012 Report Share Posted July 22, 2012 Hi everyone for the San Diego I'm making a script for a lightpatern but when I turn it on it won't go off if I click again on the icon...can anyone help me?// 1.0object VCmdAdditionalLight4 : CommandScript{ VCmdAdditionalLight4() { SetIcon(IMG); SetCursor(IMG); SetRestrictions(RESTRICT_SELFEXECUTE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return false; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return true; }void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); if (v.HasCommand(DUMMY_HASADDITIONALLIGHT4)) { v.EnableSpecialLights(false); v.RemoveCommand(DUMMY_HASADDITIONALLIGHT4); } else if (!v.HasCommand(DUMMY_HASADDITIONALLIGHT4)) { v.EnableSpecialLights(true); v.AssignCommand(DUMMY_HASADDITIONALLIGHT4); } }}; Link to comment Share on other sites More sharing options...
cops Posted July 22, 2012 Author Report Share Posted July 22, 2012 Never mind guys!I already got it working BTW: If an admin also read this, topic can be deleted or closed Link to comment Share on other sites More sharing options...