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

Solved Change sky during gameplay, MOTD Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-27-2018 , 18:24   Change sky during gameplay, MOTD Stats
Reply With Quote #1

Is it possible to change the sky during game play or on new round? I read here that only the players that would connect after the sky has changed would be able to see it, by any chance I could make the other players see it too?

Something else I wanted to ask, is this a correct way of displaying data inside variable to MOTD? I'm unable to test.

PHP Code:
    new szMotdInfo256 ], szName32 ];
    
get_user_nameidszNamecharsmaxszName ) );

    
formatexszMotdInfocharsmaxszMotdInfo ), "Player Name: %s \nKills: %d \nDamage: %.1f \nHeadshots: %d"szNameg_iPlayerStatsid ][ Player_Kills ], g_iPlayerStatsid ][ Player_Damage ], g_iPlayerStatsid ][ Player_HeadShots ] );
    
show_motdidszMotdInfo"Stats" ); 
Thanks!
__________________

Last edited by edon1337; 07-29-2018 at 11:10.
edon1337 is offline
SkumTomteN
Veteran Member
Join Date: Oct 2013
Location: Asgard
Old 07-28-2018 , 15:46   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #2

1. Not possible to change sky without reconnecting, i think people have tried this alot of times, and ive never seen it done.
2. Whats the problem, that code looks fine.
__________________
Contact: Steam
Videos: Youtube

Last edited by SkumTomteN; 07-28-2018 at 15:48.
SkumTomteN is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-28-2018 , 16:08   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #3

Maybe you can do something with SVC_NEWMOVEVARS, give it a try.
__________________

Last edited by HamletEagle; 07-28-2018 at 16:09.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-28-2018 , 17:01   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
Maybe you can do something with SVC_NEWMOVEVARS, give it a try.
PHP Code:
Name:    SVC_NEWMOVEVARS
Structure
:    
float    Gravity
float    StopSpeed
float    MaxSpeed
float    SpectatorMaxSpeed
float    Accelerate
float    AirAccelerate
float    WaterAccelerate
float    Friction
float    EdgeFriction
float    WaterFriction
float    EntGravity
float    Bounce
float    StepSize
float    MaxVelocity
float    ZMax
float    WaveHeigth
byte    Footsteps
float    RollAngle
float    RollSpeed
float    SkyColorRed
float    SkyColorGreen
float    SkyColorBlue
float    SkyVecX
float    SkyVecY
float    SkyVecZ
string    SkyName 
Do I have to fill all of these when sending that message?

Quote:
Originally Posted by SkumTomteN View Post
2. Whats the problem, that code looks fine.
Is it? I've never played with data being displayed on MOTD before, that's why I'm asking whether it is correct or not.
__________________

Last edited by edon1337; 07-28-2018 at 17:10.
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-29-2018 , 08:01   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #5

Yes, but it's more complicated than just sending the message, as soon as a difference between server cvars and client movevars is detected the server will send another message to correct this.

What I managed to do is allow each player to have a different sky and set it without altering sv_skyname, but it still requires players to reconnect.
At this point I don't know if it's even possible to change the sky without reconnecting, I'll keep testing.
__________________

Last edited by HamletEagle; 07-29-2018 at 08:01.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-29-2018 , 08:11   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
Yes, but it's more complicated than just sending the message, as soon as a difference between server cvars and client movevars is detected the server will send another message to correct this.

What I managed to do is allow each player to have a different sky and set it without altering sv_skyname, but it still requires players to reconnect.
At this point I don't know if it's even possible to change the sky without reconnecting, I'll keep testing.
I see there's no easy way in doing this, it isn't really necessary to be honest, I'll just skip it, thanks anyway!

BTW I tested the MOTD stats, and \n didn't work when trying to access a new line, what do I have to use?
__________________
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-29-2018 , 08:15   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #7

The ctrlchar by default is ^ for pawn, not \. Can be changed by using #pragma ctrlchar
__________________

Last edited by HamletEagle; 07-29-2018 at 08:15.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-29-2018 , 08:17   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #8

Quote:
Originally Posted by HamletEagle View Post
The ctrlchar by default is ^ for pawn, not \. Can be changed by using #pragma ctrlchar
I thought I had to do it the way JavaScript does it (\n), anyway I used ^n but the entire stats are still in the same line.
__________________
edon1337 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-29-2018 , 08:52   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #9

The MOTD window uses HTML, so use <br>.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-29-2018 , 08:56   Re: Change sky during gameplay, MOTD Stats
Reply With Quote #10

Quote:
Originally Posted by OciXCrom View Post
The MOTD window uses HTML, so use <br>.
Thought so, I was confused whether I had to apply Pawn code or HTML inside the 2nd parameter, am I able to change font color, size, style and add headers inside that 2nd parameter?

So something like this
PHP Code:
new szBuffer256 ];
formatexszBuffercharsmaxszBuffer ), "<h1><font color="green">Hello!</font></h1>" );

show_motdidszBuffer ); 
__________________
edon1337 is offline
Reply



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 14:25.


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