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

multiple


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
veliflst
Member
Join Date: Aug 2013
Old 10-16-2018 , 10:51   multiple
Reply With Quote #1

..

Last edited by veliflst; 08-06-2020 at 15:53.
veliflst is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 10-16-2018 , 12:28   Re: multiple motds
Reply With Quote #2

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin"Motd opener""99""98" )
    
motd_store()
}
motd_store()
{
    new 
numbermotd_text300 ]
    
number random)
    
    
formatexmotd_textcharsmaxmotd_text ), "<html><body><img src=^"https://%s^" /></body></html>", number == 0 ? "image.ibb.co/h4jG1L/RCO002-w-14700392781s.jpg":"image.ibb.co/jUH8y0/pic.jpg" )
    
new file fopen"motd.txt""w+" )
    
    if( 
file )
    {
        
fputsfilemotd_text )
        
fclosefile )
    }
    

dunno if its 100% but thats my logic...it wont be always in circle (first map = motd1, second = motd2, next = motd1, next = motd2 ect... ) but atleast 50% chance of it
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 10-16-2018 at 17:08.
JocAnis is offline
Old 10-16-2018, 13:01
veliflst
This message has been deleted by veliflst.
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 10-16-2018 , 13:37   Re: multiple motds
Reply With Quote #3

PHP Code:
#include <amxmodx>

new g_Files[4][] = {"motd.txt","motd1.txt","motd2.txt","motd3.txt"};

public 
plugin_init()
{
    
register_plugin("MOTD","0.1","SmileY");
}

public 
client_connect(id)
{
    
set_cvar_string("motdfile",g_Files[random(3)]);

Not tested

Ps. Create these files on cstrike folder with proper html code or images
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 10-16-2018 at 13:39.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
JocAnis
Veteran Member
Join Date: Jun 2010
Old 10-16-2018 , 17:10   Re: multiple motds
Reply With Quote #4

Quote:
Originally Posted by JuanPabloOlivosCordova View Post
hi thanks for response

i m not sure wat to do with the php cde, I dont know coding stuff

I went to amx compiler and copy pasted it there, and wrote a name motd, clicked compile, says 5 errors
im doing like this: copy whole php code to amxx studio, save as motd.sma , then drag that file to compiler.exe and you will get .amxx without errors, and put it as every other plugin...but i didnt test it
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Old 10-22-2018, 11:33
veliflst
This message has been deleted by veliflst.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-22-2018 , 13:40   Re: multiple motds
Reply With Quote #5

Don't use web compilers. Compile locally.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-23-2018 , 02:35   Re: multiple motds
Reply With Quote #6

Use smiley method.
__________________
@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
Old 12-11-2018, 09:55
veliflst
This message has been deleted by veliflst.
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 08:43.


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