Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #include <sdkhooks>
- #pragma tabsize 0
- #pragma semicolon 1
- public Plugin myinfo = {
- name = "[ANY] Particles",
- author = "TheUnderTaker",
- description = "Can show particles on client =)",
- version = "1.1",
- url = "http://steamcommunity.com/id/theundertaker007/"
- };
- public void OnPluginStart()
- {
- HookEvent("player_first_spawn", Event_spawn);
- PrecacheGeneric("particles/BloodFire.pcf", true);
- }
- public void OnMapStart()
- {
- PrecacheGeneric("particles/BloodFire.pcf", true);
- }
- void CreateEffect(int iClient)
- {
- float fPos[3];
- new iEnt = CreateEntityByName("info_particle_system");
- DispatchKeyValue(iEnt, "start_active", "1");
- DispatchKeyValue(iEnt, "effect_name", "bubble_2_new_2j");
- SetEntPropEnt(iEnt, Prop_Send, "m_hOwnerEntity", iClient);
- GetClientAbsOrigin(iClient, fPos);
- TeleportEntity(iEnt, fPos, NULL_VECTOR, NULL_VECTOR);
- DispatchKeyValue(iEnt, "angles", "-90 0 0");
- DispatchSpawn(iEnt);
- ActivateEntity(iEnt);
- SetVariantString("!activator");
- AcceptEntityInput(iEnt, "SetParent", iClient, iEnt);
- AcceptEntityInput(iEnt, "Start");
- }
- public Action:Event_spawn(Handle:Event, const String:strName[], bool:DontBroadcast)
- {
- new Client = GetClientOfUserId(GetEventInt(Event, "userid"));
- CreateEffect(Client);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement