AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pfn_touch (https://forums.alliedmods.net/showthread.php?t=5466)

Timmi the savage 09-02-2004 18:10

pfn_touch
 
Hi this is probally a simple question.
I was wondering why i cant pfn touch to work.

I want it to delete an entity (touched)
and then set a player (toucher) variable.

Heres what i got.

Timmi the savage 09-02-2004 18:17

New WAY

#include <engine>
#include <fakemeta>
Code:
public pfn_touch( ptr , ptd )    //When two entites touch {                 new enttouch = ptr     new touchedid = ptd     new modelName[32]     pev(id, pev_classname, modelName )     //entity_get_string ( enttouch, EV_SZ_model, modelName, 31 )//     // used to be entity.     if ( containi( modelName, "leet.mdl" ) != -1 ) {           remove_entity( szentity[id] )           questitem1[id]=1           quest(id)     } }

Timmi the savage 09-02-2004 18:18

Code:
#include <amxmodx> #include <amxmisc> #include <string> #include <engine> #include <fun> #include <cstrike>

Timmi the savage 09-02-2004 18:21

The money.mdl is precached.

The problem im having is it crashes.
Just after map start

johnjg75 09-02-2004 18:30

check the logs?

Timmi the savage 09-02-2004 18:49

Nothing in the logs?

johnjg75 09-02-2004 18:54

hmm, full code?

Timmi the savage 09-02-2004 18:57

its 215k
http://forums.alliedmods.net/showthr...?p=50029#52715
here ffx mod

Twilight Suzuka 09-02-2004 21:20

toucher is the ent, touched is the player, no matter what.

Timmi the savage 09-02-2004 22:09

awsome thanks for clearing that up

also i noticed

Code:
pfn_touch(ptr,ptd)

i guess it has to be formated like that

When i was trying to figure i tried it like that and it still kept crashing.

I was trying to get it to make the entity dissapear and set a player variable. With help i can figure out how pfn_touch. Maybe stumble on to it. I dunno I got some time off and im trying to understand this more thuroughly. ANY HELP is appreciated


All times are GMT -4. The time now is 17:12.

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