Raised This Month: $ Target: $400
 0% 

2 questions.. pfn_touch and model sequences


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
oberon
Junior Member
Join Date: Sep 2004
Location: UK
Old 11-05-2005 , 10:41   2 questions.. pfn_touch and model sequences
Reply With Quote #1

q1: pfn_touch called, then one of touching entities isnt found when u do something to it throwing a "Cannot find entity" error

i'm making a checkpoint mod for uwc3 (cs), where bomb/hostages are removed from the map, and instead 3-5 checkpoints are spawned into the map, and if one team controls all the checkpoints, the other team have X seconds to recapture a point or they all get slayed.

I got it working fine (no errors) on a test server on my machine with 5 players, and loads of bots... then when i moved it to one of our real servers, bits didnt work, and after adding debug, this line is causing the "cannot find entity" error was line 487 (attached sma below):

Code:
entity_get_string( iToucherId, EV_SZ_classname, szClassName, 31 )

from:

Code:
//---------------------------------------------------------------------------------------------- public pfn_touch( ptr, ptd ) {     return on_Touch( ptr, ptd ) } //---------------------------------------------------------------------------------------------- public on_Touch( entity1, entity2 ) {     if(get_cvar_num("cp_enable") == 0) return PLUGIN_HANDLED         // Make sure it's a player that's being touched... mmmm     new iToucherId = entity1     new iPlayerId  = entity2         if ( iPlayerId < 1 || iPlayerId > 32 || iToucherId < 1 || !is_user_alive( iPlayerId ) )         return PLUGIN_CONTINUE         new szClassName[32]     entity_get_string( iToucherId, EV_SZ_classname, szClassName, 31 )         // Change checkpoint's team     if ( equali( szClassName, "CHECKPOINT" ) ) {             // Change Checkpoint to iPlayerId's team etc etc etc

and yet stuff that can only happen if the szClassName is "CHECKPOINT" happens, even tho it cant find the entity. The checkpoint changes model to the right colour, but the xp isnt given (or even a msg to indicate that the xp function was called).

I've attached the sma, and the models (need to be in the models/uwc3_cp folder).. if anyone is bored and wants to try compiling it u wont need uwc3, just when it awards xp, it'll be 0

q2: the letter models attached have one sequence, idle which is the letter spinning 360 degrees on the spot. yet when i add the model in game, its static.

I was told the following would do the trick, but i tried 0 - 6 for the sequence number, and couldnt get it to work:

Code:
entity_set_int(iEnt, EV_INT_sequence, 0)

cheers in advance
Attached Files
File Type: zip uwc3_cp_models.zip (12.1 KB, 60 views)
File Type: sma Get Plugin or Get Source (checkpoints.sma - 598 views - 34.6 KB)
oberon is offline
Send a message via MSN to oberon
 



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 23:45.


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