Raised This Month: $32 Target: $400
 8% 

Touch positions problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 06-21-2018 , 07:14   Touch positions problem
Reply With Quote #1

im trying to make plugin with checkpoints per map, saved in .ini file ect...but i need help, how to determine what exactly position/checkpoint (model) has player touched ? I mean, the present code is working: if players touches first checkpoint he will get printed message for ALL these checkpoints on the map, which is the problem...here is the code...i dont have idea how to code that thing :s

PHP Code:
register_touch("cp_ent""player""touched1"

...
making entity cp_ent...

public 
touched1entid )
{
    for( new 
i=0cp_counti++ )//probably this is wrong, but what better to use ? :/
    
{
        
entity_get_string(entEV_SZ_targetnametargetNamecharsmax(targetName));
        if( 
containitargetNamecp_ents[i] ))
        {
            if( !
run_run[i+1] )
            {
                
run_run[i+1]=true
                Time_igrac 
get_gametime() - cp_time[id][i]
                
                
client_printidprint_chat"You touched: %i; time: %.02f (FILE: %.02f)"i+1Time_igracofficial_time[1][cp_count+1] )

            }
        }
        
//break;
    
}

JocAnis is offline
 


Thread Tools
Display Modes

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 03:39.


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