Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Includes
- #include <a_samp>
- // New's
- new FightStyle[MAX_PLAYERS];
- // Defines
- #define Fight 0
- // Colors
- #define COLOR_RED 0xFA2B25AA
- // Forward's
- forward LoadFight(playerid);
- // Publics ;)
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/fight", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, Fight, DIALOG_STYLE_LIST, "Выберите стиль борьбы:", "Обычный\nБокс\nКик бокс\nЗахваты", "Ok","Выход");
- SendClientMessage(playerid,0xFF0000AA,"Вы сменили свой стиль боя");
- return 1;
- }
- return 0;
- }
- public LoadFight(playerid)
- {
- if(FightStyle[playerid] == 0)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
- }
- if(FightStyle[playerid] == 1)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
- }
- if(FightStyle[playerid] == 2)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- }
- if(FightStyle[playerid] == 3)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Fight)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
- FightStyle[playerid] = 0;
- }
- if(listitem == 1)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
- FightStyle[playerid] = 1;
- }
- if(listitem == 2)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- FightStyle[playerid] = 2;
- }
- if(listitem == 3)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- FightStyle[playerid] = 3;
- }
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment