Setting Fighting Style.
#1

This is the command and there are no warnings or errors but when I get in game and do the command it doesn't seem to set the players fighting style.
pawn Код:
CMD:setfightstyle(playerid, params[])
{
    new targetid, style, string[128];
    if(PlayerInfo[playerid][Admin] >=3)
    {
        if(sscanf(params, "ui", targetid, style)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setfightstyle [id] [styleid]");
        if( targetid != INVALID_PLAYER_ID )
        {
            SetPlayerFightingStyle(targetid, style);
            format(string, sizeof(string),"Administrator %s has set your fighting style to id %d",pName(playerid), style);
            SendClientMessage(targetid,COLOR_RED,string);
            format(string, sizeof(string),"You have set %s's fighting style to id %d",pName(targetid), style);
            SendClientMessage(playerid,COLOR_RED,string);
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Only certan levels of Administration have access to this command.");
    }
    return 1;
}
Reply
#2

Just see at fighting styles:

PHP код:
if(dialogid == DIALOGID+81)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
SetPlayerFightingStyle (playeridFIGHT_STYLE_ELBOW);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~g~Elbow ~w~Style Changed!",2000,3);
            }
            if(
listitem == 1)
            {
                
SetPlayerFightingStyle (playeridFIGHT_STYLE_BOXING);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~g~Boxing ~w~Style Changed!",2000,3);
            }
            if(
listitem == 2)
            {
                
SetPlayerFightingStyle (playeridFIGHT_STYLE_GRABKICK);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~g~Grabkick ~w~Style Changed!",2000,3);
            }
            if(
listitem == 3)
            {
                
SetPlayerFightingStyle (playeridFIGHT_STYLE_KNEEHEAD);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~g~Nheehead ~w~Style Changed!",2000,3);
            }
            if(
listitem == 4)
            {
                
SetPlayerFightingStyle (playeridFIGHT_STYLE_KUNGFU);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~g~KungFu ~w~Style Changed!",2000,3);
            }
            if(
listitem == 5)
            {
                
SetPlayerFightingStyle (playeridFIGHT_STYLE_NORMAL);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~g~Normal ~w~Style Changed!",2000,3);
            }
        }
        return 
1;
    } 
Reply
#3

pawn Код:
CMD:setfightstyle(playerid, params[])
{
    new targetid, style, string[128];
    if(PlayerInfo[playerid][Admin] >=3)
    {
        if(sscanf(params, "ud", targetid, style)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setfightstyle [id] [4, 5, 6, 7, 15, 26]");
        if( targetid != INVALID_PLAYER_ID )
        {
            if(style > 3 && style < 8 || style == 15 || style == 26)
            {
                SetPlayerFightingStyle(targetid, style);
                format(string, sizeof(string),"Administrator %s has set your fighting style to id %d",pName(playerid), style);
                SendClientMessage(targetid,COLOR_RED,string);
                format(string, sizeof(string),"You have set %s's fighting style to id %d",pName(targetid), style);
                SendClientMessage(playerid,COLOR_RED,string);
                SetPlayerFightingStyle(giveplayerid, style);
            }  
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Only certan levels of Administration have access to this command.");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)