SA-MP Forums Archive
help | need help - 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: help | need help (/showthread.php?tid=84171)



help | need help - RonLipel_ - 29.06.2009

I wrote this on my script:
OnGameModeInIt:
Код:
	for(new Game = 0; Game < MAX_GAMES_LOOP; Game++)
	{
	  format(string, 100, "loadfs %d", Game), SendRconCommand(string);
		CallRemoteFunction("GetGameName","sd",GameNames[Game], 24);
		format(string, 100, "unloadfs %d", Game), SendRconCommand(string);
		format(string, 100, "%s", GameNames[Game]), AddMenuItem(GameVote,0,string);
	}
On top:
Код:
#define MAX_GAMES 1
#define MAX_GAMES_LOOP MAX_GAMES+1
new GameNames[MAX_GAMES_LOOP][24];
On other scripts:
Код:
public GetGameName(name[], len) return format(name, len, "%s", GAME_NAME);
GAME_NAME = "name".
i dont have any errors or warnings, but when i starting my server i have "crash report" and my server got closed.
if im writing in OnGameModeInIt like this:
Код:
	for(new Game = 0; Game < MAX_GAMES_LOOP; Game++)
	{
	  format(string, 100, "loadfs %d", Game), SendRconCommand(string);
		CallRemoteFunction("GetGameName","sd",GameNames 24);
		format(string, 100, "unloadfs %d", Game), SendRconCommand(string);
		format(string, 100, "%s", GameNames), AddMenuItem(GameVote,0,string);
	}
without [Game] in GameNames, its works, but all my items in my menu called "d", and not the game name.
my english is not so good, as u see :S
if u got the point, pls help.
*i have two scripts named "0", and "1".


Re: help | need help - RonLipel_ - 29.06.2009

Bump

Please, help me


Re: help | need help - RonLipel_ - 30.06.2009

Im so hopeless
please, someone?