[Help]Choosing for the next gamemode
#1

Can someone help me with choosing for the next gm scripts?

I mean,when Im playing,then I want to set a GM for the next GM,get it?

Like /next [GMID/NAME].I dont want it will automaticly change GM when playing on any GM.I want , after Im playing on this GM,then the GM,which I set it before start.

Is it possible to do that?
Or you not get it?
P.S: Sorry for bad english :P
Reply
#2

Can anyone help here?
Reply
#3

SendRconCommand("changemode *gamemode name*");

Maybe?
Reply
#4

Quote:
Originally Posted by AndrewP
SendRconCommand("changemode *gamemode name*");

Maybe?
Hmmm...Well,what's the cmds?
Reply
#5

pawn Код:
if(strcmp(cmd, "/changemode", true) == 0) {
if (strlen(gm)==0) {
SendClientMessage(playerid, COLOR_COLOR, "Usage: /changemode [gamemode_name]");
return 1;
}
new gm[120];
new string[120];
format(string, 120, "changemode %s", gm);
SendRconCommand(string);
return 1;
}
Try this
Reply
#6

Fail. Result:

Код:
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(91) : error 017: undefined symbol "cmd"
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(92) : error 017: undefined symbol "gm"
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(93) : error 017: undefined symbol "COLOR_COLOR"
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(103) : warning 217: loose indentation
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(103) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(103) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(108) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(108) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(108) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(113) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(113) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(113) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(118) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(118) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(118) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(123) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(123) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(123) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(128) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(128) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(128) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(133) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(133) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(133) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(138) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(138) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(138) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(143) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(143) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(143) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(148) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(148) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(148) : error 004: function "OnObjectMoved" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(153) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(153) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(153) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(158) : warning 225: unreachable code
C:\Documents and Settings\user\Desktop\SA-MP\filterscripts\changegm.pwn(158) : error 029: invalid expression, assumed zero

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


26 Errors.
Reply
#7

Код:
if (strcmp("/changemode", cmdtext, true) == 0) {
new gm[120];
new string[120];
if (strlen(gm)==0) {
SendClientMessage(playerid, COLOR_COLOR, "Usage: /changemode [gamemode_name]");
return 1;
}
format(string, 120, "changemode %s", gm);
SendRconCommand(string);
return 1;
}
Reply
#8

Hmmm,where do I need to put it to?
SendRCONCommand?
OnPlayerCommandText?
Reply
#9

This must really be broken down for you if you don't even know where to place the given code...

I'd search out & learn about strtok as a start

The given code won't work completely alone, but it would be put under OnPlayerCommandText
strtok is a function that can read words between spaces, example:
/changemode mario

strtok used only once will first find '/changemode'
Use it again, it would find 'mario'
Use it once more it would find nothing because nothing is after mario...

It's best just to search out strtok & read up on it though
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)