Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- //Dialog Defines
- #define DIALOG_FIGHT 1
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Fighting System Filterscript");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Fighting System GameMode");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- SetGameModeText("Fighting System FS v1.0");
- AddPlayerClass(299, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(292, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(294, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(36, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- UsePlayerPedAnims();
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1961.7427,1343.1292,15.3746);
- SetPlayerCameraLookAt(playerid, 1961.7427,1343.1292,15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL)
- {
- SendClientMessage(playerid, -1, "Learn some new moves! (/train)");
- }
- SetPlayerInterior(playerid, 5);
- SetPlayerPos(playerid, 772.3120,-3.3076,1000.7296);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- 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("/train", 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 OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- 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, "* You have changed your fighting style to a Normal Fighting Style.");
- }
- if(listitem == 1) // Boxing Fighting Style
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
- SendClientMessage(playerid, -1, "* You have changed your fighting style to a Boxing Fighting Style.");
- }
- if(listitem == 2) // KneeHead Fighting Style
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- SendClientMessage(playerid, -1, "* You have changed your fighting style to a KneeHead Fighting Style.");
- }
- if(listitem == 4) // GrabKick Fighting Style
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- SendClientMessage(playerid, -1, "* You have changed your fighting style to a GrabKick Fighting Style.");
- }
- if(listitem == 5) // Elbow Fighting Style
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
- SendClientMessage(playerid, -1, "* You have changed your fighting style to a Elbow Fighting Style.");
- }
- }
- return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
- }
- return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement