Hello everybody, i'm stuck on a plugin since few days, i want detect props create by a another plugin, but the trigger detect ONLY people.
BUT when a new player connect, the trigger_multiple work with props. i guess when a new player connect, he re-check every entity.
I don't know if you really understand what i want say.
the code:
Spoiler
PHP Code:
public OnPluginStart () { PrecacheModel ( "models/noname/star01.mdl" , true ); CreateTimer ( 2.0 , TriggerActivate ); } public Action : TriggerActivate ( Handle : timer ) { triggerA (); return Plugin_Stop ; } triggerA () { new trigger = CreateEntityByName ( "trigger_multiple" ); DispatchKeyValue ( trigger , "StartDisabled" , "1" ); DispatchKeyValue ( trigger , "spawnflags" , "64" ); SetEntityModel ( trigger , "models/noname/star01.mdl" ); new Float : spawn [ 3 ] = { 0.0 , 0.0 , 0.0 }; TeleportEntity ( trigger , spawn , NULL_VECTOR , NULL_VECTOR ); DispatchSpawn ( trigger ); new Float : taille_min [ 3 ] = {- 512.0 ,- 512.0 ,- 512.0 }; new Float : taille_max [ 3 ] = { 512.0 , 512.0 , 512.0 }; SetEntPropVector ( trigger , Prop_Send , "m_vecMins" , taille_min ); SetEntPropVector ( trigger , Prop_Send , "m_vecMaxs" , taille_max ); SetEntProp ( trigger , Prop_Send , "m_nSolidType" , 2 ); AcceptEntityInput ( trigger , "Enable" ); HookSingleEntityOutput ( trigger , "OnStartTouch" , OnStartTouch ); } public OnStartTouch (const String : output [], caller , activator , Float : delay ) { PrintToChatAll ( "detect" ); if ( activator > 64 ) { PrintToChatAll ( "Objet" ); decl String : strName [ 50 ]; GetEntPropString ( activator , Prop_Data , "m_iName" , strName , sizeof ( strName )); PrintToChatAll ( "%s" , strName ); } }
when i go in the zone, i see detect in chat, and when a new player join and spawn, the plugin put in chat, every entity within.
exemple:
2 players in zone = 2xdetect
2 player and 1 props = 2xdetect+1xObjet
I want it to work every props spawn.
Can you help me please, thanks !
Sorry for my bad english.