Touch positions problem
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:
|
Re: Touch positions problem
Get the origin.
Engine: Code:
or fakemeta Code:
|
Re: Touch positions problem
that will be the pain in the as* cuz it has to load origins from file + check which one is from the list...i meant if theres any simpler solution
|
Re: Touch positions problem
The only way to determine someones position is the origins, but why would that be a pain ? I can't think of anything that's complex about it.
Let us know if you need any help once you establish the basic code, happy to help :D |
Re: Touch positions problem
i missunderstood. getting the players origin isnt the problem, but with what to 'compare' their origin, when all entities (checkpoints) have the same entity_name, they are different only with cp_count :/
|
Re: Touch positions problem
Compare it with the entity origin then, im not 100% sure what you are trying to achieve, so let me know if i got something wrong
|
Re: Touch positions problem
that will change the whole structure of the code...ill see what to do, thanks anyway :)
|
Re: Touch positions problem
When creating your checkpoints entities add some extra information in iuser1/2/3/4, for example inside your for loop:
PHP Code:
|
Re: Touch positions problem
@shauli, thanks for help, but Kushfield helped me and its fixed now...so it went from:
if( containi( targetName, cp_ents[i] )) to just if(cp_ents[i-1] == ent) |
Re: Touch positions problem
Quote:
PHP Code:
|
All times are GMT -4. The time now is 09:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.