if (strcmp("/kampfstyles", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2808.0757,-1442.0732,40.0432))
{
ShowPlayerDialog(playerid, KAMPFSTYLES, DIALOG_STYLE_LIST, "Kampf Styles", "Elbow\nBoxing\nGrabkick\nKneehead\nKungfu\nNormal", "Auswählen", "Abbrechen");
return 1;
}
}
Kampfstyle Befehl:
if(dialogid == KAMPFSTYLES)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du hast nicht genug Geld!");
return 1;
}
GivePlayerMoney(playerid, -5000);
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du hast nicht genug Geld!");
return 1;
}
GivePlayerMoney(playerid, -5000);
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du hast nicht genug Geld!");
return 1;
}
GivePlayerMoney(playerid, -5000);
SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du hast nicht genug Geld!");
return 1;
}
GivePlayerMoney(playerid, -5000);
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du hast nicht genug Geld!");
return 1;
}
GivePlayerMoney(playerid, -5000);
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(listitem == 5)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
}
}
Und die Dialogs