10.09.2009, 09: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;
}
|
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;
}

