[Ajuda] /explodir
#1

eu do /explodir nick ou id e sу explodi o id 1 e 2 nao explodi os outros. me ajuda ae


Код HTML:
	if(strcmp(cmd, "/explodir", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USE: /explodir [playerid]");
				return 1;
			}
			new Jogador;
			Jogador = strval(tmp);
			new Float:burnx, Float:burny, Float:burnz;
			GetPlayerPos(Jogador,burnx, burny, burnz);
			CreateExplosion(burnx, burny , burnz + 3, 1, 3);
			GetPlayerName(Jogador, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "AdmCmd: %s explodiu %s.",PlayerName(playerid), PlayerName(Jogador));
			ABroadCast(COLOR_LIGHTRED,string,1);
		}
		else
		{
	  		SendClientMessage(playerid,COLOR_GRAD5,"Vocк nгo tem permissгo para usar esse comando!");
	 	}
		return 1;
	}
Reply
#2

Код:
	if(strcmp(cmd, "/explodir", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USE: /explodir [playerid]");
				return 1;
			}
			giveplayerid = strval(tmp);
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(IsPlayerConnected(giveplayerid))
				{
				    format(string, sizeof(string), "AdmCmd: %s explodiu %s.",giveplayer, sendername);
				    ABroadCast(COLOR_LIGHTRED,string,1);
					SetPlayerHealth(giveplayerid, 10);
					new Float:boomx, Float:boomy, Float:boomz;
					GetPlayerPos(giveplayerid,boomx, boomy, boomz);
					CreateExplosion(boomx, boomy , boomz, 7, 10);
				}
		}
		else
		{
		  	SendClientMessage(playerid,COLOR_GRAD5,"Vocк nгo tem permissгo para usar esse comando!");
	 	}
		return 1;
	}
Espero ter ajudado
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)