AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved plugin_precache (https://forums.alliedmods.net/showthread.php?t=334086)

amirwolf 08-28-2021 10:56

plugin_precache
 
When connecting, I intend to receive player steam
And the file that is created on the hosts based on their steam
To be downloaded
But what is written in the console
.bmp
Which in principle should
steam****.bmp
PHP Code:

#include <amxmodx>

new authid[35];

public 
client_connect(id)
{
    
get_user_authid(idauthidcharsmax(authid))
}
public 
plugin_precache()
{
    new 
fileName[128]
    
formatex(fileNamecharsmax(fileName), "%s.bmp"authid)
    
precache_generic(fileName)
    
    
server_print(fileName)




HamletEagle 08-28-2021 11:24

Re: plugin_precache
 
plugin_precache is called way before client_connect. At that point authid is empty.

amirwolf 08-28-2021 11:27

Re: plugin_precache
 
Quote:

Originally Posted by HamletEagle (Post 2756371)
plugin_precache is called way before client_connect. At that point authid is empty.

So in practice it is not possible?

HamletEagle 08-28-2021 11:33

Re: plugin_precache
 
It's not possible to do it the way you want to do it. The only way is to precache everything and then during gameplay set the right model/sound/sprite/whatever based on their steamid.

amirwolf 08-28-2021 11:35

Re: plugin_precache
 
So I have to download all the server files

Natsheh 08-28-2021 12:50

Re: plugin_precache
 
Its better for you to explain what are you trying to achieve?

amirwolf 08-28-2021 13:37

Re: plugin_precache
 
It's hard to explain, I was just trying to match users' steam with the file on the host
However, this was not possible

fysiks 08-28-2021 16:42

Re: plugin_precache
 
All players must have the same files precached.

Natsheh 08-28-2021 16:55

Re: plugin_precache
 
Quote:

Originally Posted by amirwolf (Post 2756383)
It's hard to explain, I was just trying to match users' steam with the file on the host
However, this was not possible

Yeah because you're not making sense, what do you mean with matching, explain properly so people can understand.

amirwolf 08-28-2021 18:30

Re: plugin_precache
 
I wanted to put photos from the website inside the server
I also made screenshots based on the players' steam to see their own information
http://amirwolf512.tk/za/
Unfortunately, I am still designing it, it is not complete
An example of a photo
http://amirwolf512.tk/za/tmp/STEAM_0...1841922327.bmp


All times are GMT -4. The time now is 11:36.

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