[Help me] In Admin command
#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


Messages In This Thread
[Help me] In Admin command - by umarmalik - 13.02.2012, 14:04
Re: [Help me] In Admin command - by SampLoverNo123 - 13.02.2012, 14:11
Re: [Help me] In Admin command - by umarmalik - 13.02.2012, 16:48
Re: [Help me] In Admin command - by Twisted_Insane - 13.02.2012, 16:50
Re: [Help me] In Admin command - by umarmalik - 13.02.2012, 17:06
Re: [Help me] In Admin command - by Twisted_Insane - 13.02.2012, 17:42
Re: [Help me] In Admin command - by Join7 - 13.02.2012, 18:02
Re: [Help me] In Admin command - by Twisted_Insane - 13.02.2012, 18:03
Re: [Help me] In Admin command - by Join7 - 13.02.2012, 18:04
Re: [Help me] In Admin command - by KingHual - 13.02.2012, 18:15

Forum Jump:


Users browsing this thread: 2 Guest(s)