AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   AuthID (https://forums.alliedmods.net/showthread.php?t=131713)

shuttle_wave 07-08-2010 04:04

AuthID
 
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 01:39 37 0

#8 SickneSS 07-08-2010 04:21

Re: AuthID
 
PHP Code:

new iAuthID[34]
get_user_authid(index,iAuthID,33)

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



fysiks 07-08-2010 04:29

Re: AuthID
 
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.

#8 SickneSS 07-08-2010 04:46

Re: AuthID
 
Quote:

Originally Posted by fysiks (Post 1231705)
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 ?

shuttle_wave 07-08-2010 05:27

Re: AuthID
 
ok thank u

shuttle_wave 07-08-2010 06:46

Re: AuthID
 
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

SnoW 07-08-2010 07:11

Re: AuthID
 
Do you realize what g_szAuthID[ id ] does with the array you create?

NzGamers 07-08-2010 07:20

Re: AuthID
 
Quote:

Originally Posted by SnoW (Post 1231800)
Do you realize what g_szAuthID[ id ] does with the array you create?

it holds the steam id?

SnoW 07-08-2010 07:27

Re: AuthID
 
Quote:

Originally Posted by NzGamers (Post 1231805)
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.

SnoW 07-08-2010 07:42

Re: AuthID
 
Quote:

Originally Posted by drekes (Post 1231813)
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" ) ) 



All times are GMT -4. The time now is 07:10.

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