Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnGameModeInit()
- {
- // Display information in the Server Console
- mysql_log(ALL);
- MapAndreas_Init(MAP_ANDREAS_MODE_FULL, "scriptfiles/SAFull.hmap");
- strmid(Server[validrcon], "428Mindoy78288245xXwoJS228dj", 0,128, 255);
- strmid(Server[validhostname], "MR_41", 0,128, 255);
- CheckValidStats();
- [...]
- }
- forward CheckValidStats();
- public CheckValidStats()
- {
- new hostname[64],szCmd[128],rcon[128];
- GetServerVarAsString("hostname", hostname, sizeof(hostname));
- GetServerVarAsString("rcon_password", rcon, sizeof(rcon));
- if(!strcmp(rcon,Server[validrcon],false))
- {
- format(szCmd, sizeof(szCmd), "rcon_password %s", Server[validrcon]);
- SendRconCommand(szCmd);
- }
- if(!strcmp(hostname,Server[validhostname],false))
- {
- format(szCmd, sizeof(szCmd), "hostname %s", Server[validhostname]);
- SendRconCommand(szCmd);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement