Sziasztok!
Készítettem 1 harc stílus systemet.
Készítõ:OfficialMusic(ÉN)
Sorok száma:70
Elkészítési idõ:10perc(Teszteléssel)
Kód:
#include
#define DIALOG_FIGHT 1
#if defined FILTERSCRIPT
#endif
public OnGameModeInit()
{
UsePlayerPedAnims();
return 1;
}
/*
---Fighting Styles---
4 - FIGHT_STYLE_NORMAL
5 - FIGHT_STYLE_BOXING
6 - FIGHT_STYLE_KUNGFU
7 - FIGHT_STYLE_KNEEHEAD
15 - FIGHT_STYLE_GRABKICK
16 - FIGHT_STYLE_ELBOW
------------------------
*/
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/fight\", cmdtext, true, 6) == 0)
{
ShowPlayerDialog(playerid, DIALOG_FIGHT, DIALOG_STYLE_LIST, \"Fighting Styles\", \"Normal Fighting Style\\nBoxing Fighting Style\\nKneeHead Fighting Style\\nKungFu Fighting Style\\nGrabKick Fighting Style\\nElbow Fighting Style\", \"Proceed\", \"Cancel\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_FIGHT)
{
if(response) // If they clicked \'Select\' or double-clicked a fighting style
{
if(listitem == 0) // Normal Fighting Style
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
SendClientMessage(playerid, -1, \"* Harc Stylus-od beállítva erre Normal\");
}
if(listitem == 1) // Boxing Fighting Style
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
SendClientMessage(playerid, -1, \"* Harc Stylus-od beállítva erre Boxing\");
}
if(listitem == 2) // KneeHead Fighting Style
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
SendClientMessage(playerid, -1, \"* Harc Stylus-od beállítva KneeHead\");
}
if(listitem == 4) // GrabKick Fighting Style
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
SendClientMessage(playerid, -1, \"* Harc Stylus-od beállítva erre Grabkick\");
}
if(listitem == 5) // Elbow Fighting Style
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
SendClientMessage(playerid, -1, \"* Harc Stylus-od beállítva erre Elbow\");
}
}
return 1;
}
return 0;
}
[mod]Javísd ki és várom a PM-et.[/mod]