GLOBALELITE.PL GLOBALELITE.pl 83 Napisano 27 Maja 2017 Share Napisano 27 Maja 2017 DescriptionTouchdown is a gamemode from online game S4 League.I'm trying my best to bring this gamemode to CSGO, so I take the sound effect, bgm, and overlay from original game.I know my codes are ugly and messy, I will arrange them and rewrite them if I have time...How To PlayCapture the ball and take it to the opposing team's goal, it's very similar to American Football.InstallSimply upload all the files to your server and fastdl. Configure Choose a well balanced map. (THIS IS VERY IMPORTANT!) Stand on where the flags and ball should spawn, aim the ground and use command "sm_whereic" (Need admin flag "ADMFLAG_GENERIC"!) Copy and post the position where "sm_whereic" print in your chat, add them in "sourcemod/configs/kento_touchdown.cfg" Reload the map. Client Commands Spoiler PHP Code: sm_guns //Weapon Menusm_vol //Change sound effect volume. Admin Commands Spoiler PHP Code: sm_resetball //Reset Ball (need ADMFLAG_GENERIC)sm_whereic //Get the position where you see (whereic.smx) Cvars Spoiler PHP Code: sm_touchdown_respawn "8.0" //Respawn Timesm_touchdown_reset "15.0" //How long to reset the ball if nobody takes the ball after ball drop sm_touchdown_ball_position "1" //Where to attach the ball when player get the ball? 0 = front, 1 = head For DevelopersI have created some natives and forwards for this plugin. You can make 3rd party plugin for this gamemode. (Maybe zep store credits?) Spoiler kento_touchdown.inc Spoiler PHP Code: /** * Gets the ball holder. * * @return client id. */native int Touchdown_GetBallHolder();/** * Gets which team drop the ball. * * @return TR = 2, CT = 3. */native int Touchdown_GetBallDropTeam();/** * Is client ball holder? * * @param client Client id. * @return True if client holding the ball. */native bool Touchdown_IsClientBallHolder(int client);/** * Called when a player drop the ball. * * @param client Player index. * @return No return */forward Action Touchdown_OnPlayerDropBall(int client);/** * Called when a player kill the ball holder. * * @param ballholder Ball Holder. * @param attacker Attacker. * @return No return */forward Action Touchdown_OnPlayerKillBall(int ballholder, int attacker);/** * Called when the ball reset. * * @param client Player index. * @return No return */forward Action Touchdown_OnBallReset();/** * Called when a player get the ball. * * @param client Player index. * @return No return */forward Action Touchdown_OnPlayerGetBall(int client);/** * Called when a player touchdown. * * @param client Player index. * @return No return */forward Action Touchdown_OnPlayerTouchDown(int client); Example plugin: kento_touchdown_test Spoiler PHP Code: #include <sourcemod>#include <kento_touchdown>#pragma newdecls required// Teams#define SPEC 1#define TR 2#define CT 3public Plugin myinfo ={ name = "[CS:GO] Touch Down Sample 3rd Party Plugin", author = "Kento from Akami Studio", version = "1.0", description = "Test touchdown natives and forwards", url = "https://github.com/rogeraabbccdd/CSGO-Touchdown"};public void OnPluginStart() { RegConsoleCmd("sm_tdtest", Command_Test, "Test");}public Action Touchdown_OnPlayerDropBall(int client){ char clientname [PLATFORM_MAX_PATH]; GetClientName(client, clientname, sizeof(clientname)); PrintToChatAll("%s drop the ball!", clientname);}public Action Touchdown_OnBallReset(){ PrintToChatAll("ball reset");}public Action Touchdown_OnPlayerGetBall(int client){ char clientname [PLATFORM_MAX_PATH]; GetClientName(client, clientname, sizeof(clientname)); PrintToChatAll("%s get the ball!", clientname);}public Action Touchdown_OnPlayerTouchDown(int client){ char clientname [PLATFORM_MAX_PATH]; GetClientName(client, clientname, sizeof(clientname)); PrintToChatAll("%s touchdown", clientname);}public Action Touchdown_OnPlayerKillBall(int ballholder, int attacker){ char ballholdername [PLATFORM_MAX_PATH]; GetClientName(ballholder, ballholdername, sizeof(ballholdername)); char attackername [PLATFORM_MAX_PATH]; GetClientName(attacker, attackername, sizeof(attackername)); PrintToChatAll("%s kill the ball holder %s", attackername, ballholdername);}public Action Command_Test(int client, int args){ char ballholdername [PLATFORM_MAX_PATH]; GetClientName(Touchdown_GetBallHolder(), ballholdername, sizeof(ballholdername)); PrintToChat(client, "Ball Drop Team %i", Touchdown_GetBallDropTeam()); PrintToChat(client, "Ball Holder %s", Touchdown_GetBallHolder()); if(Touchdown_IsClientBallHolder(client)) PrintToChat(client, "You are the ball holder"); else if(!Touchdown_IsClientBallHolder(client)) PrintToChat(client, "You are NOT the ball holder");} Changelog Spoiler 1.0Release. Known Bugs Github Issues Balls and flags not spawn after warmup. (So I force "mp_warmuptime 1", "mp_do_warmup_period 1" and then "mp_restartgame 10") To Do Change sm_slay team to freeze everyone? (like original S4) or use ForcePlayerSuicide. Add Mysql stats. Fix warmup. WARNING THIS PLUGIN ONLY WORKS IN MP_TIMELIMT, SO YOU CAN'T USE MP_MAXROUNDS. RECOMMEND MAX PLAYERS IS 10. RECOMMEND ROUNDTIME IS 5. DonateIf you apreciate my work, you can donate me via steam trade offer.Credits S4 League Developers - Thanks for their awesome game, I take idea, sound effects, bgms and overlay effect from this game. boomix - I take the flag model and resize it, and I also take lots of code(weapon menu, terminate round...etc) from his ctf gamemode. mottzi - I take the ball model and some code(spawn ball) from his Simple Ball Plugin. iEx - I think auras I use in this gamemode are made by him. I found files in my game folder, maybe I got them from someone's server. DEMO Server【TW】 AkamiStudio Touch Down 達陣模式 Beta | TWF.TWConnectGit RepoDownloadMapsThird party plugins Pełny artykuł: https://forums.alliedmods.net/showthread.php?t=297921&goto=newpost Odnośnik do odpowiedzi Udostępnij na innych stronach
Rekomendowane odpowiedzi