[Help me] In Admin command -
umarmalik - 13.02.2012
Can some one help me by making a cmd for admin.
Admin command which can set fighting styles for a normal players.
Some one please help me with that command.
Re: [Help me] In Admin command -
SampLoverNo123 - 13.02.2012
Syntax- SetPlayerFightingStyle(giveplayerid, fightstyle);
Re: [Help me] In Admin command -
umarmalik - 13.02.2012
I got bit confusion can you pm me the full code if you have.
Re: [Help me] In Admin command -
Twisted_Insane - 13.02.2012
Oh my...
What else do you need? He said more than much!
You use strcmp or ZCMD? Tell me, and I'll make your command!
Re: [Help me] In Admin command -
umarmalik - 13.02.2012
in strcmp.
I really thanks for that.
appreciated
Re: [Help me] In Admin command -
Twisted_Insane - 13.02.2012
Lol damn! I don't know strcmp well! I use ZCMD!
I'll try it! You need more than 1 command, 'cause there are more than 1 fightingstyle:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[30];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/boxingstyle", true) == 0)
{
new tmp[30];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if(IsPlayerConnected(otherplayer))
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
SendClientMessage(playerid, COLOR, "You've successfully set a player's fightingstyle to boxing!");
}
return 1;
}
return 0;
}
Tell me, if it worked or not! If yes, just copy this command, change it's name and set the fightingstyles different! Here you can find all of them:
https://sampwiki.blast.hk/wiki/Fightingstyles
Re: [Help me] In Admin command -
Join7 - 13.02.2012
If you do not know
In order: SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
FIGHT_STYLE_BOXING replacing with the one you want
Код:
4 - FIGHT_STYLE_NORMAL
5 - FIGHT_STYLE_BOXING
6 - FIGHT_STYLE_KUNGFU
7 - FIGHT_STYLE_KNEEHEAD
15 - FIGHT_STYLE_GRABKICK
26 - FIGHT_STYLE_ELBOW
Example: SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
Re: [Help me] In Admin command -
Twisted_Insane - 13.02.2012
Dude, you think he's stupid? I already said this in my previous post! You wanna get more posts or what?
Re: [Help me] In Admin command -
Join7 - 13.02.2012
I have not recharged topic, sorry
Re: [Help me] In Admin command -
KingHual - 13.02.2012
Quote:
Originally Posted by Join7
I have not recharged topic, sorry
|
LOL "recharged topic" anyway... I recommend you to use zcmd + sscanf since strtok is just TOO slow...