Anyone help me with these commands
#1

Give all cash command does work

Код:
else if(strcmp(cmdtext, "/giveallcash", true) == 0)
	{
	    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be rcon admin use /rcon login {pass}");
 		new var, string[128];
  		for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
					PlayerPlaySound(i,1057,0.0,0.0,0.0);
					GivePlayerMoney(i,var);
				}
			}
		format(string,sizeof(string)," Administrator \"%s\" has given all Players '$%d'.");
		return SendClientMessageToAll(COLOR_BLUE, string);
	}
Kicks me as well? plus does display the message before kick
Код:
else if(strcmp(cmdtext, "/kickall", true) == 0)
	{
	    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be rcon admin use /rcon login {pass}");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
		if(IsPlayerConnected(i) && (i != playerid))}
		{
		PlayerPlaySound(i,1057,0.0,0.0,0.0);
		Kick(i);
		}
		new string[128];
		format(string,sizeof(string),"[ Administrator \"%s\" has Kicked all players. ]");
		return 1;
	}
killall command kills me as well. Also it sends 100 client messages and floods my cchat.

Код:
	else if(strcmp(cmdtext, "/killall", true) == 0)
	{
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be rcon admin use /rcon login {pass}");
	 	for(new i = 0; i < MAX_PLAYERS; i++)
          {
          	if(IsPlayerConnected(i)) { SetPlayerHealth(i, 0); }
          	SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have killed all players");
          }
   		return 1;
   }
Код:
	else if(strcmp(cmdtext, "/getall", true) == 0)
	{
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be rcon admin use /rcon login {pass}");
        new Float:x,Float:y,Float:z, interior = GetPlayerInterior(playerid);
		GetPlayerPos(playerid,x,y,z);
		for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i) && (i != playerid))
				PlayerPlaySound(i,1057,0.0,0.0,0.0);
				SetPlayerPos(i,x+(playerid/4)+1,y+(playerid/4),z);
				SetPlayerInterior(i,interior);
			}
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have got all players to your self");
        new string[128];
		format(string,sizeof(string)," Administrator \"%s\" has Teleported all players.");
		return 1;
	}
this command is kinda bugged i think
Reply


Messages In This Thread
Anyone help me with these commands - by Beasthian - 29.11.2015, 08:49
Re: Anyone help me with these commands - by xTURBOx - 29.11.2015, 13:40
Re: Anyone help me with these commands - by UltraScripter - 29.11.2015, 14:00
Re: Anyone help me with these commands - by Pottus - 29.11.2015, 14:09
Re: Anyone help me with these commands - by UltraScripter - 29.11.2015, 14:13
Re: Anyone help me with these commands - by Vince - 29.11.2015, 14:30
Re: Anyone help me with these commands - by jlalt - 29.11.2015, 14:30
Re: Anyone help me with these commands - by Beasthian - 30.11.2015, 07:29

Forum Jump:


Users browsing this thread: 1 Guest(s)