Raised This Month: $12 Target: $400
 3% 

Solved Image in /top15


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
karimoo97
Member
Join Date: Apr 2018
Location: Tamazgha
Old 05-21-2018 , 19:58   Image in /top15
Reply With Quote #1

HELLO everyone I hope you are doing well
I want to edit the /top15 of the plugin I use (Basic SkillPoints[FVault])

Request 1: Show 15 players instead of 10.
Spoiler


Request 2: Add an image on top.

I have seen a server that uses a costum version of this plugin that has an image on top of the motd as you you will see below :

Spoiler


Of course I tried doing it myself [i'm a noob] by adding this
Spoiler


to the (what I think is the code of /top15)
Spoiler


It didn't work of course
Is it because:
1- I did it wrong.
2- They are using the SQL version (LINK) while I'm using the fvault one ?
I'm pretty it's because of reason 1,I know that it is possible to use images in motd
.
.
.
.
.
Extra questions if it's doable :
1- Can I use a GIF image ? (animated)
2- what is the ma size of the image ?
3- Can I use more then one ? egne on top with my server name and one below with some info (ranks will be reset XX/XX/XX at XX:YY....)

THANK YOU VERY MUCH

GREETINGS


EDIT:
Solution :
PHP Code:
<img src=^"TheLinkToYourImage.jpg^" alt=^"Top15^" width=^"100%%^" height=^"100px^">\ 

Last edited by karimoo97; 05-23-2018 at 01:33.
karimoo97 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-21-2018 , 20:44   Re: Image in /top15
Reply With Quote #2

Already been asked search..

Its due motd characters limitation.

If you want to use more than the motd char limit use web page.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-21-2018 at 20:50.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
karimoo97
Member
Join Date: Apr 2018
Location: Tamazgha
Old 05-21-2018 , 23:43   Re: Image in /top15
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
Already been asked search..

Its due motd characters limitation.

If you want to use more than the motd char limit use web page.
So there is a character limitation,good to know


I didn't find any topic related to using an image in top15 via the sma of a plugin,HELP please
karimoo97 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-21-2018 , 23:58   Re: Image in /top15
Reply With Quote #4

Use sql to send to ur web server data about ur top15 list and then display it on ur web
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-22-2018 at 00:00.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
karimoo97
Member
Join Date: Apr 2018
Location: Tamazgha
Old 05-22-2018 , 00:15   Re: Image in /top15
Reply With Quote #5

I don't mean to be rude bro but did you even read the thread ?


.

Last edited by karimoo97; 05-22-2018 at 00:45.
karimoo97 is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 05-22-2018 , 08:59   Re: Image in /top15
Reply With Quote #6

Quote:
1- Can I use a GIF image ? (animated)
Yes you can, with few frames or it won't show properly

edit: size it will depend on players resolution, to big, it will be longer to load, or it won't show!

Last edited by tarsisd2; 05-22-2018 at 09:00. Reason: see edit:
tarsisd2 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-22-2018 , 09:48   Re: Image in /top15
Reply With Quote #7

Quote:
Originally Posted by karimoo97 View Post
I don't mean to be rude bro but did you even read the thread ?


.
Well i was referring to request one.


PHP Code:
<body>
<
img src="img.jpg" alt="Top15" width="100%%" height="100px">
</
body
Btw your request has nothing to do with pawn language.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-22-2018 at 10:26.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
karimoo97
Member
Join Date: Apr 2018
Location: Tamazgha
Old 05-22-2018 , 21:52   Re: Image in /top15
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
Well i was referring to request one.
I don't know what you are talking about,sorry

Quote:
Originally Posted by Natsheh View Post
PHP Code:
<body>
<
img src="img.jpg" alt="Top15" width="100%%" height="100px">
</
body
Btw your request has nothing to do with pawn language.
This should be HTML ?
Thank you very much for your help,please tell me where do I put it ? is this ok ?

PHP Code:
public TopSkillid 

    if( !
get_pcvar_numg_iEnableSkillPointsTop15 ) ) 
    { 
        
ClientPrintColorid"!g%s!n Command disabled"PREFIX 
    } 
     
    else 
    { 
        
show_motdidg_szMotd"TOP 15" 
    } 
     
    return ( 
get_pcvar_numg_iHideCmds ) == ) ? PLUGIN_CONTINUE PLUGIN_HANDLED_MAIN 


public 
MakeTop15( ) 

    new 
iLen 
    iLen 
formatexg_szMotdcharsmaxg_szMotd ), 
    
"<body bgcolor=#A4BED6>\ 
    <body><img src="
img.jpg" alt="Top15" width="100%%" height="100px"></body> // <-- here ? and should I remove /body ?
    <table width=100%% cellpadding=2 cellspacing=0 border=0>\ 
    <tr align=center bgcolor=#52697B>\ 
    <th width=4%%>#\ 
    <th width=30%% align=left>Player\ 
    <th width=8%%>Kills\ 
    <th width=8%%>Deaths\ 
    <th width=8%%>HS\ 
    <th width=8%%>Knife\ 
    <th width=8%%>Grenade\ 
    <th width=8%%>Bombs\ 
    <th width=8%%>Defuses\ 
    <th width=10%>SkillPoints" 

     
    new Array:
aKey ArrayCreate35 
    new Array:
aData ArrayCreate128 
    new Array:
aAll ArrayCreateFvaultData 
     
    
fvault_loadg_VaultSkillPointsaKeyaData 
     
    new 
iArraySize ArraySizeaKey 
     
    new 
DataFvaultData 
     
    new 

    
for( 0iArraySizei++ ) 
    { 
        
ArrayGetStringaKeyiDataszSteamID ], sizeof DataszSteamID ] - 
        
ArrayGetStringaDataiDataszSkillP_Data ], sizeof DataszSkillP_Data ] - 
         
        
ArrayPushArrayaAllData 
    } 
     
    
ArraySortaAll"SortData" 
     
    new 
szPlayerPoints
    new 
szPlayerLevel
     
    new 
szPlayerKills
    new 
szPlayerDeahts
    new 
szPlayerHeadShots
    new 
szPlayerKnifeKills
    new 
szPlayerKnifeDeaths
    new 
szPlayerGrenadeKills
    new 
szPlayerGrenadeDeaths
    new 
szPlayerBombExplosions
    new 
szPlayerDefusedBombs
    new 
szPlayerWonRounds
     
    new 
szName22 
    new 
iSize clampiArraySize012 
     
    new 

    
for( 0iSizej++ ) 
    { 
        
ArrayGetArrayaAlljData 
         
        
fvault_get_datag_VaultNamesDataszSteamID ], szNamecharsmaxszName ) ) 
         
        
replace_allszNamecharsmaxszName ), "<""[" 
        
replace_allszNamecharsmaxszName ), ">""]" 
         
        
parseDataszSkillP_Data ], 
        
szPlayerPointscharsmaxszPlayerPoints ), 
        
szPlayerLevelcharsmaxszPlayerLevel ), 
         
        
szPlayerKillscharsmaxszPlayerKills ), 
        
szPlayerDeahtscharsmaxszPlayerDeahts ), 
        
szPlayerHeadShotscharsmaxszPlayerHeadShots ), 
        
szPlayerKnifeKillscharsmaxszPlayerKnifeKills ), 
        
szPlayerKnifeDeathscharsmaxszPlayerKnifeDeaths ), 
        
szPlayerGrenadeKillscharsmaxszPlayerGrenadeKills ), 
        
szPlayerGrenadeDeathscharsmaxszPlayerGrenadeDeaths ), 
        
szPlayerBombExplosionscharsmaxszPlayerBombExplosions ), 
        
szPlayerDefusedBombscharsmaxszPlayerDefusedBombs ), 
        
szPlayerWonRoundscharsmaxszPlayerWonRounds ) ) 
         
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<tr align=center>" 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%i"
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td align=left>%s"szName 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerKills 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerDeahts 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerHeadShots 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerKnifeKills 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerGrenadeKills 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerBombExplosions 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerDefusedBombs 
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerPoints 
    } 
     
    
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"</table></body>" 
     
    
ArrayDestroyaKey 
    
ArrayDestroyaData 
    
ArrayDestroyaAll 

karimoo97 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-22-2018 , 22:14   Re: Image in /top15
Reply With Quote #9

Remove the body tag and add at the last of the line this \

And add this before each quote ^
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-22-2018 at 22:16.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
karimoo97
Member
Join Date: Apr 2018
Location: Tamazgha
Old 05-22-2018 , 22:53   Re: Image in /top15
Reply With Quote #10

Like this ?

PHP Code:
public TopSkillid )  
{  
    if( !
get_pcvar_numg_iEnableSkillPointsTop15 ) )  
    {  
        
ClientPrintColorid"!g%s!n Command disabled"PREFIX )  
    }  
      
    else  
    {  
        
show_motdidg_szMotd"TOP 15" )  
    }  
      
    return ( 
get_pcvar_numg_iHideCmds ) == ) ? PLUGIN_CONTINUE PLUGIN_HANDLED_MAIN  
}  

public 
MakeTop15( )  
{  
    new 
iLen  
    iLen 
formatexg_szMotdcharsmaxg_szMotd ),  
    
"<body bgcolor=#A4BED6>\  
    <img ^src="
TheLinkToMyImage.jpg" ^alt="Top15" ^width="100%%" ^height="100px">\
    <table width=100%% cellpadding=2 cellspacing=0 border=0>\  
    <tr align=center bgcolor=#52697B>\  
    <th width=4%%>#\  
    <th width=30%% align=left>Player\  
    <th width=8%%>Kills\  
    <th width=8%%>Deaths\  
    <th width=8%%>HS\  
    <th width=8%%>Knife\  
    <th width=8%%>Grenade\  
    <th width=8%%>Bombs\  
    <th width=8%%>Defuses\  
    <th width=10%>SkillPoints" 
)  
      
    new Array:
aKey ArrayCreate35 )  
    new Array:
aData ArrayCreate128 )  
    new Array:
aAll ArrayCreateFvaultData )  
      
    
fvault_loadg_VaultSkillPointsaKeyaData )  
      
    new 
iArraySize ArraySizeaKey )  
      
    new 
DataFvaultData ]  
      
    new 
i  
    
for( 0iArraySizei++ )  
    {  
        
ArrayGetStringaKeyiDataszSteamID ], sizeof DataszSteamID ] - )  
        
ArrayGetStringaDataiDataszSkillP_Data ], sizeof DataszSkillP_Data ] - )  
          
        
ArrayPushArrayaAllData )  
    }  
      
    
ArraySortaAll"SortData" )  
      
    new 
szPlayerPoints]  
    new 
szPlayerLevel]  
      
    new 
szPlayerKills]  
    new 
szPlayerDeahts]  
    new 
szPlayerHeadShots]  
    new 
szPlayerKnifeKills]  
    new 
szPlayerKnifeDeaths]  
    new 
szPlayerGrenadeKills]  
    new 
szPlayerGrenadeDeaths]  
    new 
szPlayerBombExplosions]  
    new 
szPlayerDefusedBombs]  
    new 
szPlayerWonRounds]  
      
    new 
szName22 ]  
    new 
iSize clampiArraySize012 )  
      
    new 
j  
    
for( 0iSizej++ )  
    {  
        
ArrayGetArrayaAlljData )  
          
        
fvault_get_datag_VaultNamesDataszSteamID ], szNamecharsmaxszName ) )  
          
        
replace_allszNamecharsmaxszName ), "<""[" )  
        
replace_allszNamecharsmaxszName ), ">""]" )  
          
        
parseDataszSkillP_Data ],  
        
szPlayerPointscharsmaxszPlayerPoints ),  
        
szPlayerLevelcharsmaxszPlayerLevel ),  
          
        
szPlayerKillscharsmaxszPlayerKills ),  
        
szPlayerDeahtscharsmaxszPlayerDeahts ),  
        
szPlayerHeadShotscharsmaxszPlayerHeadShots ),  
        
szPlayerKnifeKillscharsmaxszPlayerKnifeKills ),  
        
szPlayerKnifeDeathscharsmaxszPlayerKnifeDeaths ),  
        
szPlayerGrenadeKillscharsmaxszPlayerGrenadeKills ),  
        
szPlayerGrenadeDeathscharsmaxszPlayerGrenadeDeaths ),  
        
szPlayerBombExplosionscharsmaxszPlayerBombExplosions ),  
        
szPlayerDefusedBombscharsmaxszPlayerDefusedBombs ),  
        
szPlayerWonRoundscharsmaxszPlayerWonRounds ) )  
          
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<tr align=center>" )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%i")  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td align=left>%s"szName )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerKills )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerDeahts )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerHeadShots )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerKnifeKills )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerGrenadeKills )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerBombExplosions )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerDefusedBombs )  
        
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<td>%s"szPlayerPoints )  
    }  
      
    
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"</table></body>" )  
      
    
ArrayDestroyaKey )  
    
ArrayDestroyaData )  
    
ArrayDestroyaAll )  

karimoo97 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 20:35.


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