[TUT=FS]Sistema de Luta
#1

Muitos nгo tem o sistema que altera o tipo de Luta entгo resolvi postar aqui...
Code:
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//


//=============----- Includes by Luan -----============//

#include <a_samp>

//=============----- News by Luan -----============//
new Menu:sistemadeluta;

//=============----- Importantes by Luan -----============//

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Estilo de LUTA! by Luan");
	print("--------------------------------------\n");
	
	sistemadeluta = CreateMenu("Sistema de Luta", 1, 50.0, 180.0, 200.0, 200.0);
	AddMenuItem(sistemadeluta, 0, "Luta ~~> Boxe");
	AddMenuItem(sistemadeluta, 0, "Luta ~~> Kongfu");
	AddMenuItem(sistemadeluta, 0, "Luta ~~> Briga de Rua");
	AddMenuItem(sistemadeluta, 0, "Luta ~~> Agarra e Chute");
	AddMenuItem(sistemadeluta, 0, "Luta ~~> Normal");
	AddMenuItem(sistemadeluta, 0, "Sair / Fechar");
	
	return 1;
}

//=============----- Comando by Luan -----============//

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mudarluta", cmdtext, true, 10) == 0)
	{
		ShowMenuForPlayer(sistemadeluta, playerid);
		TogglePlayerControllable(playerid,0);
		return 1;
	}
	return 0;
}

//=============----- Funзхes do Menu by Luan -----============//

public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == sistemadeluta)
  {
    switch(row)
    {
      case 0:{
      SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);

      }
      case 1:{
      SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);

      }
      case 2:{
      SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);

      }
      case 3:{
      SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);

      }
      case 4:{
      SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
      
			}
			case 5:{
      SendClientMessage(playerid, 0x00ff00ff, " Vocк fechou o Menu de SISTEMA DE LUTA ");
      
      }
    }
  }

	return 1;
}

//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
//=============----- SISTEMA DE LUTA BY LUAN -----============//
Reply
#2

Muito Simples.
Reply
#3

Mas Util!
Reply
#4

Bem fixe, jб aprendi algo novo =)

Jб agora devias ter postado nas releases.
Reply
#5

o local esta certo..

Bom tuto... muita gente tem essa duvida...
Reply
#6

eu ja vi um parecido em algum lugar...
Reply
#7

ei luan pode me ensinar a usar o comando /mudarluta nesse local (1515.8604,-1676.2458,14.0469)
Reply
#8

Й simples:


Sу por assim no OnPlayerCommandText:

pawn Code:
if(IsPlayerInRangeOfPoint(playerid,7.0,1515.8604,-1676.2458,14.0469))
 {
 SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
 }
й so isso... claro que o estilo de lutar, й so vc trocar
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)