Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include sourcemod
- #include sdkhooks
- #include sdktools
- public OnMapStart()
- {
- CreateTimer( 2.0, Timer_PrecacheModel );
- }
- public Action:Timer_PrecacheModel( Handle:timer )
- {
- PrecacheModel("models/f18/f18.mdl");
- }
- public OnEntityCreated(entity, const char[] classname)
- {
- if(StrEqual(classname, "pipe_bomb_projectile"))
- {
- SDKHook(entity, SDKHook_StartTouchPost, OnTouch)
- SetEntityModel(entity, "models/f18/f18.mdl")
- }
- }
- public OnTouch(int entity, int other)
- {
- if (!other)
- {
- SetEntityMoveType(entity, MOVETYPE_NONE);
- }
- else if(other)
- {
- SetEntityMoveType(entity, MOVETYPE_NONE);
- }
- }
- public OnEntityDestroyed(entity)
- {
- if(IsValidEntity(entity))
- {
- char classname[32];
- GetEntityClassname(entity, classname, sizeof(classname))
- if(StrEqual(classname, "pipe_bomb_projectile"))
- {
- SDKUnhook(entity, SDKHook_StartTouchPost, OnTouch)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment