Raised This Month: $ Target: $400
 0% 

[help]valeur dans motd.txt


  
 
 
Thread Tools Display Modes
Author Message
AirShot
Veteran Member
Join Date: Sep 2009
Location: Belgium
Old 07-11-2011 , 18:00   [help]valeur dans motd.txt
#1

Bonsoir ! Donc voilà, le truc c'est que j'ai un bout de code qui ouvre un motd :

PHP Code:
public CmdHelpiPlayer )
{

    new 
iLen copyg_szMotdcharsmaxg_szMotd ), "<h3>Ce serveur utilise HnS Rank, il fonctionne avec des points</h3>" );
    
    new 
iPoints get_pcvar_numpCvarKill );
    
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<p>Tu recois %d points en tuant quelqu'un. (Frag Points)<br />"iPoints);
    
    
iPoints get_pcvar_numpCvarSurvive );
    
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"Tu recois %d points en survivant en Terroriste. (Survive Points)<br />"iPoints);
    
    
iPoints get_pcvar_numpCvarDie);
    
iLen += formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"Tu perd %d points en mourrant. (Lost Points)"iPoints);
    
    if( 
get_pcvar_numpCvarBm ) )
    {
        
iLen += copyg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<br />Tu gagnes des points atteint le block de points. (Block Points)" );
    }
    
    
iLen += copyg_szMotdiLen ], charsmaxg_szMotd ) - iLen"</p>" );
    
    new Array:
aPlayerData;
    new 
iNumPlayers GetTopPlayersaPlayerData );
    
    new 
iPos FindPlayerInTopaPlayerDataiNumPlayersg_szSteamIDiPlayer ] );
    
    if( 
iPos >= )
    {
        
formatexg_szMotdiLen ], charsmaxg_szMotd ) - iLen"<p>Ton rang est actuellement %d sur %d avec %d points</p>", ( iPos ), iNumPlayersg_iPointsiPlayer ][ Point_Total ] );
    }
    
    
ArrayDestroyaPlayerData );
    
    
show_motdiPlayerg_szMotd"Help" );

ça marche très bien sauf qu'en jeux ça donne pas très beau :



donc je me suis fait un petit help.txt :
Code:
<html>
<style type="text/css">
body
{
background-color:#000000;
background-position:top center;
background-image:url(http://www.usaplongee.fr/e107_themes/DeepBlue2/images/news-background.jpg);
}
</style>

<body>
<div align="center">
<font face="Arial" size="4" color="#999999"><b>
HnS Rank
</font>
<br>
<br>
<font face="Arial" size="2" color="#FFFFFF">
HnS rank est basé sur un système de points.<br>
<br>
Tu recois %d points en tuant quelqu'un. (Frag Points)<br>
Tu recois %d points si tu survis en terroriste. (Survive Points)<br>
Tu perd %d points si tu meurt. (Lost Points)<br>
Tu peux aussi recevoir des points lorsque tu marche sur un bloc de points<br>
<br>
Ton rang est actuellement %s sur %s joueurs avec un total de %s points
</div>
</body>
</html>
pour que ça ressemble à ça.


le problème c'est que je sais pas du tout comment remplacer les valeurs correctement, j'ai essayé un ptit peut tout seul puis en regardant d'en d'autre plugins mais j'ai pas réussi, du coup je m'en remet à vous espérant que vous pourrez m'aider
__________________

Last edited by AirShot; 07-11-2011 at 18:02.
AirShot is offline
sooN
Veteran Member
Join Date: Apr 2009
Old 07-11-2011 , 23:55   Re: [help]valeur dans motd.txt
#2

Mets le fichier .txt à la racine du serveur et avec ça 'show_motd(iPlayer, "help.txt")' il est possible que ça s'ouvre :p Après je suis pas sûr d'avoir compris ce que tu recherches exactement.
__________________
sooN is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2011 , 06:21   Re: [help]valeur dans motd.txt
#3

Fous le code du help.txt dans le .sma et format les lignes en remplaçant les valeurs, je vois pas pourquoi tu n'as pas fait ça.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
AirShot
Veteran Member
Join Date: Sep 2009
Location: Belgium
Old 07-12-2011 , 06:57   Re: [help]valeur dans motd.txt
#4

merci, mais comment je suis sensé faire? avec les balise comme <style type="text/css">? c'est les guillemets qui m'embête. (désolé je suis sans doute très nul ^^)
__________________
AirShot is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2011 , 08:20   Re: [help]valeur dans motd.txt
#5

Guillemet tu fous ^ devant.

<style type=^"text/css^">
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
AirShot
Veteran Member
Join Date: Sep 2009
Location: Belgium
Old 07-12-2011 , 09:19   Re: [help]valeur dans motd.txt
#6

ok merci, je m'en sort plus ou moins (sauf que c'est chiant à faire ><)
par contre j'ai fait un truc plus long enfaite et la fin du motd s'affiche pas, y a une limite de caractère à pas dépasser?
__________________

Last edited by AirShot; 07-12-2011 at 09:30.
AirShot is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2011 , 10:35   Re: [help]valeur dans motd.txt
#7

1536
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 00:55.


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