[Help me] In Admin command
#1

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.
Reply
#2

Syntax- SetPlayerFightingStyle(giveplayerid, fightstyle);
Reply
#3

I got bit confusion can you pm me the full code if you have.
Reply
#4

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!
Reply
#5

in strcmp.

I really thanks for that.

appreciated
Reply
#6

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
Reply
#7

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);
Reply
#8

Dude, you think he's stupid? I already said this in my previous post! You wanna get more posts or what?
Reply
#9

I have not recharged topic, sorry
Reply
#10

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)