Raised This Month: $ Target: $400
 0% 

Surf Passthrough Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-03-2005 , 16:18   Surf Passthrough Help
Reply With Quote #1

Hey, I got this so far for the surfing passthrough thing that was requested in the suggestions / requests forum, but it seems to crash the server, I was wondering if anyone would be willing to fix it or know how.

Code:
#include <amxmodx> #include <engine> #include <fun> new bool:surfmap = false public plugin_init()     {     new surftrue = check_surf()     if(surftrue == 1)         {         surfmap = true     }     register_plugin("Surf Passthrough","1.0","Hawk552")     register_cvar("surf_passthrough","1") } stock check_surf()     {     new mapname[64]     get_mapname(mapname,63)     if(containi(mapname,"surf_")!=-1)         {         return 1     }     return 0 } public pfn_touch(ptr,ptd)     {     if(ptd == 0 || ptr == 0)     {         return PLUGIN_CONTINUE     }         if(is_user_connected(ptr) && is_user_alive(ptr))         {         if(surfmap == false)             {             return PLUGIN_CONTINUE         }                 if(get_cvar_num("surf_passthrough")==0)             {             return PLUGIN_HANDLED         }                 new classname[64]         entity_get_string(ptd,EV_SZ_classname,classname,63)                 if(containi(classname,"trigger_")!=-1)             {             return PLUGIN_CONTINUE         }         else         {                         entity_set_int(ptr,EV_INT_solid,SOLID_TRIGGER)                     }     }     return PLUGIN_CONTINUE }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 09-03-2005 , 21:18  
Reply With Quote #2

Code:
public pfn_touch(ptr,ptd) {     if(ptr > 0 && ptd >= 0)     {         if(is_user_connected(ptr) && is_user_alive(ptr))         {             if(surfmap == false)                 return PLUGIN_CONTINUE         }                 if(get_cvar_num("surf_passthrough")==0)             return PLUGIN_CONTINUE                 new classname[64]         entity_get_string(ptd,EV_SZ_classname,classname,63)                 if(containi(classname,"trigger_"))             entity_set_int(ptr,EV_INT_solid,SOLID_TRIGGER)                 }     return PLUGIN_CONTINUE }
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-03-2005 , 21:20  
Reply With Quote #3

No, I DON'T want it to SOLID_TRIGGER when it's touching a trigger_. Being solid 0 while touching a trigger_teleport crashes the server, and touching a trigger_hurt doesn't kill you.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode