SA-MP Forums Archive
Hostname Change - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hostname Change (/showthread.php?tid=137666)



Hostname Change - Heron - 29.03.2010

Hi I saw that in many server hostname changed every few seconds as I set it also in my GameMode? There is a special station or you must add a few string?


Re: Hostname Change - XRVX - 29.03.2010

Code:
forward HostNameChange();

public OnGameModeInit()
{
SetTimer( "HostNameChange", true, 10*1000 ); //timer will execute every 10th second
return true;
}

public HostNameChange()
{	
//here do the hostname change
}
search next time
http://forum.sa-mp.com/index.php?topic=139642.0


Re: Hostname Change - Correlli - 29.03.2010

Quote:
Originally Posted by XRVX
Code:
SetTimer( "HostNameChange", true, 10*1000 ); //timer will execute every 10th second
Correct usage is SetTimer(funcname[], interval, repeating);

It's functions name, interval and then repeating, and not functions name, repeating and interval like you did.


Re: Hostname Change - Heron - 29.03.2010

Make me an example please?
------------------
Me 4 errors. :

C:\Documents and Settings\main\Desktop\Samp\gamemodes\lslrp.pwn(535 94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\main\Desktop\Samp\gamemodes\lslrp.pwn(535 94) : error 017: undefined symbol "ITA"
C:\Documents and Settings\main\Desktop\Samp\gamemodes\lslrp.pwn(535 94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\main\Desktop\Samp\gamemodes\lslrp.pwn(535 94) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.