SSziasztok készítettem egy harc Style váltó scriptet és gondoltam megosztom veletek is
Harc Stylusok :
-Boxing
-KeenHead
-GrabKick
-Elbow
#include <a_samp>
#pragma tabsize 0
#define DIALOG_FIGHT 1
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Fight System\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print(\"\\n----------------------------------\");
print(\" Fight System\");
print(\"----------------------------------\\n\");
}
#endif
public OnGameModeInit()
{
UsePlayerPedAnims();
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/fight\", cmdtext, true, 6) == 0)
{
ShowPlayerDialog(playerid, DIALOG_FIGHT, DIALOG_STYLE_LIST, \"Harc Styles\", \"Normal\\nBoxing\\nKneeHead\\nKungFu\\nGrabKick\\nElbow\", \"Kiválaszt\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_FIGHT)
{
if(response)
{
if(listitem == 0) // Normal
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
SendClientMessage(playerid, -1, \"* Harc Styles Beállítva erre: Normal\");
}
if(listitem == 1) // Boxing
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
SendClientMessage(playerid, -1, \"* Harc Styles Beállítva erre: Boxing\");
}
if(listitem == 2) // KneeHead
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
SendClientMessage(playerid, -1, \"* Harc Styles Beállítva erre: KneeHead\");
}
if(listitem == 4) // GrabKick
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
SendClientMessage(playerid, -1, \"* vHarc Styles Beállítva erre: GrabKick\");
}
if(listitem == 5) // Elbow
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
SendClientMessage(playerid, -1, \"* Harc Styles Beállítva erre: Normal Elbow\");
}
}
return 1;
}
return 0;
}