Raised This Month: $32 Target: $400
 8% 

Solved plugin_precache


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 08-28-2021 , 10:56   plugin_precache
Reply With Quote #1

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)


__________________

Last edited by amirwolf; 09-03-2021 at 15:15.
amirwolf is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2021 , 11:24   Re: plugin_precache
Reply With Quote #2

plugin_precache is called way before client_connect. At that point authid is empty.
__________________
HamletEagle is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 08-28-2021 , 11:27   Re: plugin_precache
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
plugin_precache is called way before client_connect. At that point authid is empty.
So in practice it is not possible?
__________________
amirwolf is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2021 , 11:33   Re: plugin_precache
Reply With Quote #4

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.
__________________
HamletEagle is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 08-28-2021 , 11:35   Re: plugin_precache
Reply With Quote #5

So I have to download all the server files
__________________
amirwolf is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-28-2021 , 12:50   Re: plugin_precache
Reply With Quote #6

Its better for you to explain what are you trying to achieve?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 08-28-2021 , 13:37   Re: plugin_precache
Reply With Quote #7

It's hard to explain, I was just trying to match users' steam with the file on the host
However, this was not possible
__________________
amirwolf is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-28-2021 , 16:42   Re: plugin_precache
Reply With Quote #8

All players must have the same files precached.
__________________
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-28-2021 , 16:55   Re: plugin_precache
Reply With Quote #9

Quote:
Originally Posted by amirwolf View Post
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.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-28-2021 at 16:55.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 08-28-2021 , 18:30   Re: plugin_precache
Reply With Quote #10

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
__________________

Last edited by amirwolf; 08-28-2021 at 18:37.
amirwolf is offline
Reply


Thread Tools
Display Modes

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 01:02.


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