[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


Messages In This Thread
Minigame Tipo "Sky High Fight" GTA V - by Mr._Thug/Dark_Boy - 20.03.2015, 22:11
Re: Minigame Tipo "Sky High Fight" GTA V - by ipsLuan - 20.03.2015, 22:43
Re: Minigame Tipo "Sky High Fight" GTA V - by Dayvison_ - 20.03.2015, 23:04
Re: Minigame Tipo "Sky High Fight" GTA V - by Jardell - 21.03.2015, 03:14
Re: Minigame Tipo "Sky High Fight" GTA V - by #Luca[S]. - 21.03.2015, 03:19
Re: Minigame Tipo "Sky High Fight" GTA V - by ipsLuan - 21.03.2015, 12:06
Re: Minigame Tipo "Sky High Fight" GTA V - by Mr._Thug/Dark_Boy - 21.03.2015, 15:48
Re: Minigame Tipo "Sky High Fight" GTA V - by Mr._Thug/Dark_Boy - 21.03.2015, 15:50
Re: Minigame Tipo "Sky High Fight" GTA V - by defaubr - 23.03.2015, 16:16

Forum Jump:


Users browsing this thread: 1 Guest(s)