Raised This Month: $ Target: $400
 0% 

Blockmaker SteamID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 10:49   Re: Re: Blockmaker SteamID
Reply With Quote #1

Quote:
Originally Posted by micapat View Post
Clearly not. With a plugin which uses flags, you don't have to recompile it each time you add a new SteamID.
Finally, someone reasonable.
__________________
No salvation. Only madness.
P1raten is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-07-2013 , 20:11   Re: Blockmaker SteamID
Reply With Quote #2

It is also quicker and more efficient to check Flags than to compare (multiple) Strings.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
WeeZick
Member
Join Date: Oct 2012
Location: Gothenburg, Sweden
Old 02-08-2013 , 08:57   Re: Blockmaker SteamID
Reply With Quote #3

Okey, But if i want to add more steamid's?
WeeZick is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 02-08-2013 , 09:40   Re: Blockmaker SteamID
Reply With Quote #4

You have quite a few options:
SQL
File read
nVault

See the tutorials for each and deduce what's the best for you.
Backstabnoob is offline
WeeZick
Member
Join Date: Oct 2012
Location: Gothenburg, Sweden
Old 02-08-2013 , 10:23   Re: Blockmaker SteamID
Reply With Quote #5

nVault, But i asked what to do if i want to add more steamid's?
WeeZick is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-08-2013 , 10:41   Re: Blockmaker SteamID
Reply With Quote #6

You add them in users.ini
__________________
Impossible is Nothing
Sylwester is offline
WeeZick
Member
Join Date: Oct 2012
Location: Gothenburg, Sweden
Old 02-08-2013 , 11:07   Re: Blockmaker SteamID
Reply With Quote #7

But i wonder what should i do to add more steamid's. Should i go like this?

public somefunction(id)
{
new szSteamID[32];
get_user_authid(id, szSteamID, charsmax(szSteamID);
if (szSteamID == "SteamID1 Here")
if (szSteamID == "SteamID2 Here")
{
// do stuff here
}
}
WeeZick is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 11:32   Re: Blockmaker SteamID
Reply With Quote #8

Quote:
Originally Posted by WeeZick View Post
But i wonder what should i do to add more steamid's. Should i go like this?

public somefunction(id)
{
new szSteamID[32];
get_user_authid(id, szSteamID, charsmax(szSteamID);
if (szSteamID == "SteamID1 Here")
if (szSteamID == "SteamID2 Here")
{
// do stuff here
}
}
Quote:
Originally Posted by Sylwester View Post
You add them in users.ini
Also, you're doing it wrong.

If you insist on using SteamID then for checking multiple it's better to use a switch statement rather than if statements.
__________________
No salvation. Only madness.
P1raten is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-08-2013 , 11:42   Re: Blockmaker SteamID
Reply With Quote #9

Quote:
Originally Posted by P1raten View Post
If you insist on using SteamID then for checking multiple it's better to use a switch statement rather than if statements.
You can't use switch with strings. In this case the best option (other than using flags) would be celltrie.
__________________
Impossible is Nothing
Sylwester is offline
Old 02-08-2013, 11:43
P1raten
This message has been deleted by P1raten. Reason: Doublepost
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 11:11.


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