why dont my fight command work?
#10

Quote:
Originally Posted by Stas92
The fighting styles don't work for me. I have copied the command in the samp wiki:
Код:
if (strcmp(cmdtext, "/kungfu", true) == 0)
	{
  	SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
  	SendClientMessage(playerid, COLOR_LIGHTGREEN, "Fighting Style changed to Kung-Fu");
  	return 1;
	}
But the player is stil using cj's fighting style?
Same Thing with me. The only time i actually see this function work is after i stop punching, then my character gets into the correct stance (eg a boxing stance). Other than that, my fighting style always looks "normal" :\.


Here's my command:

pawn Код:
dcmd_fight(playerid, params[])
{
    new Style, FightName[15];
   
    if(!sscanf(params, "i", Style))
    {
        if(Style >= 1 && Style <= 6)
        {
            switch(Style)
          {
            case 1: {Style = 4, FightName = "Normal";}
            case 2: {Style = 5, FightName = "Boxing";}
            case 3: {Style = 6, FightName = "KungFu";}
            case 4: {Style = 7, FightName = "KneeHead";}
            case 5: {Style = 15, FightName = "GrabKick";}
            case 6: {Style = 26, FightName = "Elbow";}
            }
            SetPlayerFightingStyle(playerid, Style);
            format(String, sizeof(String), "Your new fighting style is %s",FightName);
            SendClientMessage(playerid, white, String);
            return 1;
        }
        else
        {
          SendClientMessage(playerid, red, "Error: /Fight <1-6>");
          return 1;
        }
    }
    else
    {
      SendClientMessage(playerid, red, "Error: /Fight <1-6>");
    }
    return 1;
}

Reply


Messages In This Thread
why dont my fight command work? - by [mad]MLK - 04.09.2009, 19:36
Re: why dont my fight command work? - by eminich - 04.09.2009, 20:16
Re: why dont my fight command work? - by [mad]MLK - 04.09.2009, 20:20
Re: why dont my fight command work? - by Balon - 04.09.2009, 20:29
Re: why dont my fight command work? - by kc - 04.09.2009, 20:33
Re: why dont my fight command work? - by (.Aztec); - 04.09.2009, 20:34
Re: why dont my fight command work? - by dice7 - 04.09.2009, 20:36
Re: why dont my fight command work? - by (.Aztec); - 05.09.2009, 01:39
Re: why dont my fight command work? - by Stas92 - 10.09.2009, 08:25
Re: why dont my fight command work? - by Kyosaur - 10.09.2009, 09:10

Forum Jump:


Users browsing this thread: 1 Guest(s)