fight style problem -
N0FeaR - 28.07.2012
When i buy a fightstyle i dont get it.
pawn Код:
}
if(dialogid == 760)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerCash(playerid) >= 50)
{
SendClientMessage(playerid, COLOR_WHITE, "Now you got Boxing fight style");
GivePlayerCash(playerid,-50);
if(PlayerInfo[playerid][pFight] == 1) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); }
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERROR] You do not have enough money");
return 1;
}
}
case 1:
{
if(GetPlayerCash(playerid) >= 65)
{
SendClientMessage(playerid, COLOR_WHITE, "Now you got Kung Fu fight style");
GivePlayerCash(playerid,-65);
if(PlayerInfo[playerid][pFight] == 3) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU); }
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERROR] You do not have enough money");
return 1;
}
}
case 2:
{
if(GetPlayerCash(playerid) >= 85)
{
SendClientMessage(playerid, COLOR_WHITE, "Now you got Kneehead fight style");
GivePlayerCash(playerid,-85);
if(PlayerInfo[playerid][pFight] == 4) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD); }
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERROR] You do not have enough money");
return 1;
}
}
case 3:
{
if(GetPlayerCash(playerid) >= 80)
{
SendClientMessage(playerid, COLOR_WHITE, "Now you got El Bow fight style");
GivePlayerCash(playerid,-80);
if(PlayerInfo[playerid][pFight] == 5) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERROR] You do not have enough money");
return 1;
}
}
case 4:
{
if(GetPlayerCash(playerid) >= 115)
{
SendClientMessage(playerid, COLOR_WHITE, "Now you got Grab kick fight style");
GivePlayerCash(playerid,-115);
if(PlayerInfo[playerid][pFight] == 6) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERROR] You do not have enough money");
return 1;
}
}
}
}
return 1;
Re: fight style problem -
Littlehelper - 28.07.2012
Do you have any additional Filterscripts that are preventing dialogs from working?
if yes then remove return 0; from them.
Re: fight style problem -
SuperViper - 28.07.2012
You're checking if the player already has that fight style before setting it.
Re: fight style problem -
Jessyy - 28.07.2012
Change From:
Код:
if(PlayerInfo[playerid][pFight] == 1) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); }
to
Код:
PlayerInfo[playerid][pFight] = 1;
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
------------------------------
Change From:
Код:
if(PlayerInfo[playerid][pFight] == 3) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU); }
to
Код:
PlayerInfo[playerid][pFight] = 3;
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
------------------------------
Change From:
Код:
if(PlayerInfo[playerid][pFight] == 4) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD); }
to
Код:
PlayerInfo[playerid][pFight] = 4;
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
------------------------------
Change From:
Код:
if(PlayerInfo[playerid][pFight] == 5) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);}
to
Код:
PlayerInfo[playerid][pFight] = 5;
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
------------------------------
Change From:
Код:
if(PlayerInfo[playerid][pFight] == 6) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);}
to
Код:
PlayerInfo[playerid][pFight] = 6;
SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);