This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Boolean at an origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 06-13-2014 , 12:31   Re: Boolean at an origin
Reply With Quote #1

Nope.

And since origins are floats in this case, and let's say you have 5 decimals (you probably have more). On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory. But of course you can't use more than 2,147,483,647 indexes since that's how far a signed integer will reach. Even if integer is used for the origin values we're still talking 128 megabytes of memory. And I think that is a pretty small map size.

In other words, what do you really want to do?

You could create "zones" which consists of 2 origins which will set the outline of the area, comparing the player origin.
You could create entities at each location and do a search for them. But you can only create so many entities.
__________________

Last edited by Black Rose; 06-13-2014 at 12:40.
Black Rose is offline
kimilover
Junior Member
Join Date: Oct 2010
Old 06-13-2014 , 15:17   Re: Boolean at an origin
Reply With Quote #2

thx fo your awnser i want to help i have a hns blocks server and i want to use someone all blocks xp and not only one at a map... the code is this.
PHP Code:
ActionXPBlock(ident)
{
    if ( 
cs_get_user_team(id) == CS_TEAM_T )
    {
        if ( !
g_xpblock_used[id] )
        {
            new 
property[5];
            
GetProperty(ent1property);
            
hnsxp_add_user_xp(idstr_to_num(property));
            
g_xpblock_used[id] = true;
            
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"You got %i more XP!"str_to_num(property));
        }
    }
        else
        {
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"Only Terrorists can take XP Block!");
    }

with this when a player use one xp block he cant use another block. and i have a lot of xp blocks at a map. i want a player use all blocks once time per map.
kimilover is offline
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 03:22.


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