Raised This Month: $ Target: $400
 0% 

AuthID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-08-2010 , 04:04   AuthID
Reply With Quote #1

This is my code for model. its simple. but my only problem is that how come it wont set me the model according to my steam id?

PHP Code:
    if(equal(g_szAuthID[id], "STEAM_0:0:27205883"))
    {
        new 
ShuttleModel[64]; 
        
formatex(ShuttleModel63"%s"Shuttle_Model); 
        
cs_set_user_model(idShuttleModel);
    } 

my steam id is STEAM_0:0:27205883 0 019 37 0
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 07-08-2010 , 04:21   Re: AuthID
Reply With Quote #2

PHP Code:
new iAuthID[34]
get_user_authid(index,iAuthID,33)

if(
equal(iAuthID,"IDHERE"))
{
  
//Do Something


Last edited by #8 SickneSS; 07-08-2010 at 04:25.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-08-2010 , 04:29   Re: AuthID
Reply With Quote #3

I believe there is a plugin that does this already. By Connor I believe. If you don't want to use it you can still learn from it by reading the source code.
__________________
fysiks is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 07-08-2010 , 04:46   Re: AuthID
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
I believe there is a plugin that does this already. By Connor I believe. If you don't want to use it you can still learn from it by reading the source code.
Maybe...http://forums.alliedmods.net/showthread.php?t=21086 ?
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-08-2010 , 05:27   Re: AuthID
Reply With Quote #5

ok thank u
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-08-2010 , 06:46   Re: AuthID
Reply With Quote #6

PHP Code:
    new g_szAuthID[34];
    
get_user_authid(idg_szAuthID33);
    
    if(
equal(g_szAuthID[id], "STEAM_0:0:27205883"))
    {
        new 
szSName[32];
        
get_user_name(idszSName31);
        
        
set_hudmessage(255000.100.5506.06.00.50.153);
        
show_hudmessage(0"%s has join ( Shuttle_Wave )^nCreator of this Mod"szSName);
        
client_printc(0"Shuttle_Wave has connected ( %s ). The Creator of this Mod"szSName);
    } 
doesnt seem to work
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-08-2010 , 07:11   Re: AuthID
Reply With Quote #7

Do you realize what g_szAuthID[ id ] does with the array you create?
SnoW is offline
Send a message via MSN to SnoW
NzGamers
Member
Join Date: Jul 2009
Old 07-08-2010 , 07:20   Re: AuthID
Reply With Quote #8

Quote:
Originally Posted by SnoW View Post
Do you realize what g_szAuthID[ id ] does with the array you create?
it holds the steam id?
NzGamers is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-08-2010 , 07:27   Re: AuthID
Reply With Quote #9

Quote:
Originally Posted by NzGamers View Post
it holds the steam id?
I was actually talking what the operator [ ] does. But you are wrong, g_szAuthID[ id ] doesn't hold the auth id but only a character of it or actually a part of the string in this situation.

Last edited by SnoW; 07-08-2010 at 07:43.
SnoW is offline
Send a message via MSN to SnoW
Old 07-08-2010, 07:29
drekes
This message has been deleted by drekes. Reason: nvm
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-08-2010 , 07:42   Re: AuthID
Reply With Quote #10

Quote:
Originally Posted by drekes View Post
Isn't it supposed to be:
PHP Code:
if(equal(g_szAuthID[33], "STEAM_0:0:27205883")) 
No, you shouldn't pass the last character either. How about comparing the whole string, would that do something?
PHP Code:
if( equalg_szAuthID"STEAM_0:0:27205883" ) ) 
SnoW is offline
Send a message via MSN to SnoW
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 07:11.


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