AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Server Add automatic SteamId to .ini / is possible? (https://forums.alliedmods.net/showthread.php?t=233611)

Bugg 01-17-2014 16:43

Server Add automatic SteamId to .ini / is possible?
 
Well.

1 question.

Is possible server add automatic a steamID from a player in a .ini?

When the round ends pluggin randomly select a user to give a gift.
The player whose turn it is the gift has certain privileges on the server, for that reason I would like that person added his SteamID in a. Ini to get those privileges.
Can it be done?
Would need some help, as I have proven several things but does not write automatically on steam ID. Ini.
and do not want to have to manually do it consistently every time you touch someone.

Any help please?

Seriousness please
Ty.

fysiks 01-17-2014 16:47

Re: Server Add automatic SteamId to .ini / is possible?
 
Post the code that you tried and then explain what you are actually trying to do. What "privileges" are you trying to give and for how long?

Bugg 01-20-2014 10:53

Re: Server Add automatic SteamId to .ini / is possible?
 
PHP Code:

public client_authorized(id) {
    
    new 
Authid[35]
    
    
get_user_authid(idAuthidcharsmax(Authid))
    
    if(!
TrieKeyExists(UsersAuthid))
        
server_cmd("autoadd(id, %s)"Authid)
        




what´s wrong?
Server dont add automatic steamID to mly file .ini

why?

is this wrong --> server_cmd("autoadd(id, %s)", Authid)?

ty.

YamiKaitou 01-20-2014 10:54

Re: Server Add automatic SteamId to .ini / is possible?
 
Quote:

Originally Posted by Bugg (Post 2088541)
is this wrong --> server_cmd("autoadd(id, %s)", Authid)?

Yes

Code:

server_cmd("autoadd ^"%s^"", Authid)

Bugg 01-20-2014 11:23

Re: Server Add automatic SteamId to .ini / is possible?
 
Works!!!!!

I love you.


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

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