ANy help I dont know this mean
#1

What is this for

Quote:

dcmd_changemode(playerid, params[])
{
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){

new idx,gamemode,tmp[256],string[128];

tmp = strtok(params, idx);

if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /changemode (gamemode) - Enter A Number 1 - 3");
return 1;
}

if(!isNumeric(tmp))
{
SendClientMessage(playerid, COLOR_ERROR, "Invalid Gamemode Please Use A Numeric Character.");
return 1;
}

gamemode = strval(tmp);

if(gamemode < 1 || gamemode > 3)
{
SendClientMessage(playerid, COLOR_ERROR, "Invalid Gamemode Please Enter A Number 1 - 3.");
return 1;
}

for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
//SendClientMessage(i,COLOR_SERVER_HELP_MSG, "The Week is Over! - Please Reconnect.");
PlayerInfo[i][pSpawn] = 0;
//Kick(i);
}
}

switch (gamemode)
{

case 1:
{
format(string, sizeof(string), "{FFFFFF}Game Mode Changed: {BDBDBD}Los Santos");
}

case 2:
{
format(string, sizeof(string), "{FFFFFF}Game Mode Changed: {BDBDBD}Las Venturas");
}

case 3:
{
format(string, sizeof(string), "{FFFFFF}Game Mode Changed: {BDBDBD}San Fierro");
}
}
SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);

format(string, sizeof(string), "UPDATE server SET Gamemode = '%d' WHERE Server = '2'",gamemode);
mysql_query(string);

GameTextForAll("~b~THE WEEK IS OVER!~n~~w~CHANGING CITIES", 5000, 3);
SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, "{FFFFFF}The Week is Over! - {FF0000}Changing Cities");
SendRconCommand("gmx");

}else{
SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
}

return 1;
}

Reply


Messages In This Thread
ANy help I dont know this mean - by NNek - 27.06.2014, 06:14
Re: ANy help I dont know this mean - by Lynn - 27.06.2014, 06:29
Re: ANy help I dont know this mean - by NNek - 27.06.2014, 06:36
Re: ANy help I dont know this mean - by yvoms - 27.06.2014, 06:46
Re: ANy help I dont know this mean - by NNek - 27.06.2014, 06:49
Re: ANy help I dont know this mean - by NNek - 27.06.2014, 14:52

Forum Jump:


Users browsing this thread: 1 Guest(s)