AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Adding Steam ID to SCXPM. (https://forums.alliedmods.net/showthread.php?t=278464)

BlackShadow306 02-01-2016 07:44

Adding Steam ID to SCXPM.
 
Hello Guys

I've been working like hours to add Steam ID to SCXPM:

Before putting codes i'm trying to do it SCXPM will get Steam ID auto not manual.So don't tell me add manually please.


Steam ID Works only on Chat. It's shows 0 on SCXPM Hud.

Steam ID Checker:

PHP Code:

register_clcmd("say /steamid","ClCmd_Print",0

PHP Code:

public ClCmd_Print(id)
{
    new 
szAuthID[33]
    
get_user_authid(id,szAuthID,32)
    
client_print(id,print_chat,szAuthID)
    return 
PLUGIN_HANDLED
    



SCXPM HUD:

PHP Code:

show_hudmessage(i,"Exp.:   %i / %i  (+%i)^nLevel:   %i / 1800^nRank:   %s^nMedals:   %i / 15 ^nSteam ID: %i",xp[i],neededxp[i],neededxp[i]-xp[i],playerlevel[i],rank[i],medals[i]-1,szAuthID[i]) 

I did everything but i failed. I'm waiting your helps!

wickedd 02-01-2016 07:52

Re: Adding Steam ID to SCXPM.
 
PHP Code:

show_hudmessage(i,"Exp.:   %i / %i  (+%i)^nLevel:   %i / 1800^nRank:   %s^nMedals:   %i / 15 ^nSteam ID: %i",xp[i],neededxp[i],neededxp[i]-xp[i],playerlevel[i],rank[i],medals[i]-1,szAuthID[i]) 

:arrow:

PHP Code:

show_hudmessage(i,"Exp.:   %i / %i  (+%i)^nLevel:   %i / 1800^nRank:   %s^nMedals:   %i / 15 ^nSteam ID: %s",xp[i],neededxp[i],neededxp[i]-xp[i],playerlevel[i],rank[i],medals[i]-1,szAuthID[i]) 


BlackShadow306 02-01-2016 16:55

Re: Adding Steam ID to SCXPM.
 
I changed cvar to this as you gived me.

PHP Code:

show_hudmessage(i,"Exp.:   %i / %i  (+%i)^nLevel:   %i / 1800^nRank:   %s^nMedals:   %i / 15 ^nSteam ID: %s",xp[i],neededxp[i],neededxp[i]-xp[i],playerlevel[i],rank[i],medals[i]-1,szAuthID[i]) 

But its blank now. It's not showing anything it's probaly about on my Steam ID retriver.

I think im not connecting properly. or i can't make it show on SCXPM Hud. Also Steam ID Retriver and SCXPM in same .sma file


Could you check it out please? Here's codes.

register_clcmd:

PHP Code:

register_clcmd("steamid","ClCmd_GetSteamID",0


Steam ID Retriver Plugin:

PHP Code:

public ClCmd_GetSteamID(id)
{
    
    
get_user_authid(id,szAuthID,32)
    
console_print(id,szAuthID)
    return 
PLUGIN_HANDLED


SCXPM Hud:

PHP Code:

show_hudmessage(i,"Exp.:   %i / %i  (+%i)^nLevel:   %i / 1800^nRank:   %s^nMedals:   %i / 15 ^nSteam ID: %s",xp[i],neededxp[i],neededxp[i]-xp[i],playerlevel[i],rank[i],medals[i]-1,szAuthID[i]) 


wickedd 02-01-2016 17:42

Re: Adding Steam ID to SCXPM.
 
First of all. What's SCXPM?

PHP Code:

#include < amxmodx >
#include < hamsandwich >

public plugin_init()
{
    
RegisterHamHam_Spawn"player""oNSpawn")  
    
}
    
public 
oNSpawnid )
{
    new 
sSteamID21 ]
    
get_user_authididsSteamIDcharsmaxsSteamID ) )
    
    if( 
is_user_aliveid ) )
    {
        
client_printidprint_chat" Your SteamID is %s"sSteamID )
        
//PLACE YOUR HUD MESSAGE HERE
    
}


Try that and tell me if it works. It should show your SteamID every time you spawn.

BlackShadow306 02-01-2016 18:56

Re: Adding Steam ID to SCXPM.
 
SCXPM is a level plugin for SvenCoop made by Silencer123

Link: https://forums.alliedmods.net/showthread.php?t=44168


http://i.hizliresim.com/or4k6b.jpg

Anyways i compiled the codes you gave me but it made hud disappear.

Also i'm trying show SteamID on there as i show in picture

This cVar made that HUD disappear:

PHP Code:

 RegisterHamHam_Spawn"player""oNSpawn"

I think it's not Ham_Sandwich supported or not working proper.

http://i.hizliresim.com/E59Rmz.jpg

As i said before im trying make SteamID show on Steam ID : on SCXPM Hud

But it's shows not properly.

wickedd 02-01-2016 19:10

Re: Adding Steam ID to SCXPM.
 
It's time for you to post your code, show me what you're doing.

Edit: Try this, type /steam in chat.
PHP Code:

#include < amxmodx >

public plugin_init()
{
    
register_clcmd"say /steam""try_this" );      
}
    
public 
try_thisid )
{
    new 
sSteamID21 ]
    
get_user_authididsSteamIDcharsmaxsSteamID ) )
    
    if( 
is_user_aliveid ) )
    {
        
client_printidprint_chat" Your SteamID is %s"sSteamID )
        
//PLACE YOUR HUD MESSAGE HERE
    
}


Edit 2: I'm just showing a way to get your SteamID, so don't copy and paste my code into your plugin.

BlackShadow306 02-01-2016 19:29

Re: Adding Steam ID to SCXPM.
 
1 Attachment(s)
Here's the source code of plugin. (In the Attached Files) And the last plugin shows SteamID only in when you type on chat.

So currently these are the cVars plugins has:

PHP Code:

new szAuthID[32

PHP Code:

register_clcmd("steamid","ClCmd_GetSteamID",0

PHP Code:

    public ClCmd_GetSteamID(id)
{
    
    
get_user_authid(id,szAuthID,32)
    
console_print(id,szAuthID)
    return 
PLUGIN_HANDLED


when you type steamid in console it's working but it's still not showing on HUD.

wickedd 02-01-2016 20:35

Re: Adding Steam ID to SCXPM.
 
1 Attachment(s)
Here you go, look in the .sma and you'll see what I did.
Edit: Look at lines 55, 604 and 1284

BlackShadow306 02-01-2016 21:16

Re: Adding Steam ID to SCXPM.
 
Sir! I salute you! Thanks so much. You're far best It worked like charm :) :3

I also looked the changes you made i couldn't been think that way :) Thanks so much again !!!

:bacon!: :bacon!: :bacon!: :bacon!: :bacon!:


All times are GMT -4. The time now is 09:29.

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