[GameMode] Minigame Tipo "Sky High Fight" GTA V
#1

Introduзгo


Boas Pessoal, estava a jogar GTA V com uns amigos um game mode chamado "Sky High Fight", onde vбrios jogadores estгo numa plataforma suspensa no ar e a ideia e deitar outros jogadores fora da plataforma ou mata-los com porrada. Achei fбcil fazer um pequeno "gamemode" com uns objetos parecido а plataforma do GTA V podendo ser usado para gamemodes de freeroam/minigames.
O mapa irei atualizando, alterando objetos e adicionando mais, ou pode ir dando umas arranjadas por sua conta


Imagens





Cуdigo


Код:
//----------------------------------------------------------
//
//  Agradecimentos a equipa Sa-MP pela base do Grandlarc
// 
//
//----------------------------------------------------------

#include <a_samp>
#include <core>
#include <float>
#include "../include/gl_common.inc"

#pragma tabsize 0

//----------------------------------------------------------

#define COLOR_WHITE 		0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFBB7777
new Float:RandomSpawns[][] =
{
	{241.5320,2469.4272,220.5534, 90.2055},
	{253.3893,2458.6221,221.2534, 94.9352},
	{245.2603,2458.4807,222.2534, 94.9352},
	{240.9214,2458.2063,222.1780, 94.9352},
	{241.1501,2448.4319,221.2534, 94.9352},
	{231.1320,2458.5571,220.9534, 2.8144}
};

new thisanimid=0;
new lastanimid=0;

//----------------------------------------------------------

main()
{
	print("\n---------------------------------------");
	print("Sky High Fight by Darkboy\n");
	print("---------------------------------------\n");
}

//----------------------------------------------------------

public OnPlayerConnect(playerid)
{
	GameTextForPlayer(playerid,"~w~Sky High Fight",3000,4);
  	SendClientMessage(playerid,COLOR_WHITE,"Bem Vindo ao {88AA88}Sky{FFFFFF}High {88AA88}Fight");
 	return 1;
}

//----------------------------------------------------------

public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, 81);
	SetPlayerInterior(playerid,0);
	TogglePlayerClock(playerid,0);
 	ResetPlayerMoney(playerid);
	new Random = random(sizeof(RandomSpawns));
	SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
	return 1;
}

//----------------------------------------------------------

public OnPlayerDeath(playerid, killerid, reason)
{
	if(killerid == INVALID_PLAYER_ID) {
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
}

public OnGameModeInit()
{
	SetGameModeText("Grand Larceny");
	ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
	ShowNameTags(1);
	SetNameTagDrawDistance(40.0);
	EnableStuntBonusForAll(0);
	DisableInteriorEnterExits();
	SetWeather(2);
	SetWorldTime(11);
CreateObject(2935, 238.60001, 2458.7, 219.60001, 0, 2, 0);
CreateObject(2935, 244.7002, 2458.7998, 219.8, 0, 0, 0);
CreateObject(2935, 241.59961, 2458.7002, 219.7, 0, 2, 0);
CreateObject(3925, 241.3, 2452.3999, 219.2, 0, 350, 94);
CreateObject(3925, 241.60001, 2465, 219, 3.913, 12.026, 95.166);
CreateObject(1337, 199.08691, 2409.54, 173.15868, 0, 0, 0);
CreateObject(2934, 241.2, 2469.6001, 218.10001, 0, 0, 92);
CreateObject(3925, 234.7, 2458.8, 219.10001, 1.955, 12.003, 187.58);
CreateObject(3925, 249, 2458.7, 219.39999, 0, 349.997, 185.999);
CreateObject(2934, 241, 2448.1001, 218.8, 0, 0, 88);
CreateObject(2934, 230.10001, 2458.8999, 218.5, 0, 0, 182);
CreateObject(2934, 253.5, 2458.8999, 218.8, 0, 0, 178);
	UsePlayerPedAnims();
	return 1;
}

//----------------------------------------------------------

public OnPlayerUpdate(playerid)
{
	if(!IsPlayerConnected(playerid)) return 0;
	if(IsPlayerNPC(playerid)) return 1;
	
	// No weapons in interiors
	if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
	    SetPlayerArmedWeapon(playerid,0); // fists
	    return 0; // no syncing until they change their weapon
	}
	
	// Don't allow minigun
	if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) {
	    Kick(playerid);
	    return 0;
	}
	

	if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
	    Kick(playerid);
	    return 0;
	}
	return 1;
}
Reply
#2

Ficou bom, parabйns.
Reply
#3

Gostei do minigame + rep
Reply
#4

Sinceramente, para um GM deste "porte", poderia ter sido melhor!

Atй outra hora.
Reply
#5

Nгo seria melhor fazer um FS?
Bom parabйns, muito bom!
Reply
#6

Era melhor ter colocado como FilterScript ou cуdigo ъtil.
E, o cуdigo em sн poderia ser melhorado.
Reply
#7

Quote:
Originally Posted by Jardell
Посмотреть сообщение
Sinceramente, para um GM deste "porte", poderia ter sido melhor!

Atй outra hora.
era para colocar so os objetos e ai a pessoa fazia o que quisesse com o mapa mas nem todos jogaram GTA V e fica dificil de compreender, o gamemode usado foi o primeiro simples que vi (GrandLarc)
Reply
#8

Quote:
Originally Posted by Luan Argolo
Посмотреть сообщение
Era melhor ter colocado como FilterScript ou cуdigo ъtil.
E, o cуdigo em sн poderia ser melhorado.
Eu ia colocar so os objetos e ai o player fazia o que quisesse com ele, so aproveitei o GrandLarc para primeiro servir para tirar SS e depois queria testar o mapa e ver se ficava bom com os spawns randonamicos pela plataforma, nada de dificil neste "gamemode" ate quem percebe pouco fazia melhor
Reply
#9

Gostei em... Bom para qualquer tipo de server (Ou pelo menos que eu me lembro kkk) para fazer tipo evento Like estilo Igor 3 Coelhos !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)