SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/03/2019, 03:51 PM   #1
playstores
Huge Clucker
 
Join Date: Feb 2018
Location: Germany
Posts: 218
Reputation: 19
Default GetValidStats();

https://pastebin.com/FmDHxt4n

It just sets the hostname to the hostname of the server not Server[validhostname]
playstores is offline   Reply With Quote
Old 30/03/2019, 04:45 PM   #2
playstores
Huge Clucker
 
Join Date: Feb 2018
Location: Germany
Posts: 218
Reputation: 19
Default Re: GetValidStats();

push up
playstores is offline   Reply With Quote
Old 31/03/2019, 04:38 AM   #3
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,324
Reputation: 652
Default Re: GetValidStats();

pawn Code:
if(!strcmp(hostname,Server[validhostname],false))
    {
        format(szCmd, sizeof(szCmd), "hostname %s", Server[validhostname]);
        SendRconCommand(szCmd);
    }

In this 'if' line you are checking to see if the current hostname matches Server[validhostname], instead of the opposite which is what you need. You'll want to remove the '!' to make sure the strings do NOT match.
Crayder is offline   Reply With Quote
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



All times are GMT. The time now is 12:28 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.