You need to know which light it is you want to turn on and off. In your code, you are trying to toggle a light you reference with "CLight", but thats an unidentified variable.
Use the GET_ENTITY_BY_STRING or similar functions to get a pointer to the entity. -av Rob z wrote: > ok im not the best of coders sooo a lil more help would be nice after > looking at what botman wrote and reading through some code about the > GetClassPtr() function i was hoping this would work ( to test i am putting > the code in the client command function ) > > CBaseEntity *pLight = NULL; > pLight = GetClassPtr( (CLight *)NULL ); > pLight->Use(NULL, NULL, USE_TOGGLE, 0); // toggle on or off > > but it returns me some errors that im not very sure what to do to solve. can > anyone help? > error C2065: 'CLight' : undeclared identifier > : error C2059: syntax error : ')' > > i think that CLight is the wrong thing to put to find the light entity but i > have no idea what to put :( > > _________________________________________________________________ > Join the world�s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders -- --------- [DRP]Avatar-X SillyZone Homepage: www.thesillyzone.com SillyZone Forums: forum.thesillyzone.com My Homepage: www.cyberwyre.com _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

