24.07.2010, 00:08
Not sure it works, but should.
And btw, this kind of command can't return a error message saying that the gamemode hasn't been found
And btw, this kind of command can't return a error message saying that the gamemode hasn't been found
pawn Код:
if(strcmp(cmd, "/setmode", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE," USAGE: /setmode [gamemode name]");
return 1;
}
new string[128]; // Remove this if you already have it defined
format(string,sizeof(string),"changemode %s",tmp);
SendRconCommand(string);
}
return 1;
}