Raised This Month: $ Target: $400
 0% 

Blockmaker SteamID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WeeZick
Member
Join Date: Oct 2012
Location: Gothenburg, Sweden
Old 02-08-2013 , 11:07   Re: Blockmaker SteamID
Reply With Quote #1

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 #2

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 #3

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