Help with a simple cmd
#12

My own solution works and I think that's much easier. I made it like this if you're interested:

Quote:


COMMAND: setfightstyle(playerid, params[])
{

new style[6], fightvar;
style[0] = FIGHT_STYLE_NORMAL;
style[1] = FIGHT_STYLE_BOXING;
style[2] = FIGHT_STYLE_KUNGFU;
style[3] = FIGHT_STYLE_KNEEHEAD;
style[4] = FIGHT_STYLE_GRABKICK;
style[5] = FIGHT_STYLE_ELBOW;

if (sscanf(params, "i", fightvar))SendClientMessage(playerid, 0xFFFFFF, "Usage: /setfightstyle <number> type /fightlist for a list of styles");
else
{
if(style[fightvar] == GetPlayerFightingStyle(playerid)) SendClientMessage(playerid, 0xFFFFFF, "You already have this fightingstyle");
else
{
SendClientMessage(playerid, 0xFFFFFF, "Your Style has been changed!");
SetPlayerFightingStyle(playerid, style[fightvar]);
}
}

return 1;


}

Reply


Messages In This Thread
Help with a simple cmd - by waza75 - 07.04.2011, 14:35
Re: Help with a simple cmd - by Steve M. - 07.04.2011, 14:38
Re: Help with a simple cmd - by omer5198 - 07.04.2011, 14:38
Re: Help with a simple cmd - by waza75 - 07.04.2011, 14:41
Re: Help with a simple cmd - by Steve M. - 07.04.2011, 14:45
Re: Help with a simple cmd - by waza75 - 07.04.2011, 14:49
Re: Help with a simple cmd - by waza75 - 07.04.2011, 15:09
Re: Help with a simple cmd - by radhakr - 07.04.2011, 16:28
Re: Help with a simple cmd - by waza75 - 07.04.2011, 18:14
Re: Help with a simple cmd - by radhakr - 07.04.2011, 18:38
Re: Help with a simple cmd - by waza75 - 07.04.2011, 18:42
Re: Help with a simple cmd - by waza75 - 07.04.2011, 19:17
Re: Help with a simple cmd - by radhakr - 07.04.2011, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)