GAMEMODE PROBLEM !
#7

here is the whole script fixed and nothing deleted from it

Код:
// Dogg's Bodyguards vs. Vagos
// By Ernesto Team


#include <a_samp>
#include <a_npc>
#include <a_objects>
#include <a_players>
#include <a_vehicles>
#define TEAM_BODYGUARDS 1
#define TEAM_VAGOS 2
#define COLOR_BLUE 0x0000FFFF
#define COLOR_YELLOW 0xF0FF00FF
#define COLOR_BODYGUARDS 0x0000FFFF
#define COLOR_VAGOS 0xF0FF00FF
new gTeam[MAX_PLAYERS];
new gActivePlayers[MAX_PLAYERS];
new gLastGaveCash[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
main()
{
  print("\n----------------------------------");
  print(" Dogg's Bodyguards vs. Vagos by Ernesto Team");
  print("----------------------------------\n");
}



public OnGameModeInit()
{
	SetGameModeText("Dogg's Bodyguards vs. Vagos");
	ShowPlayerMarkers (1);
	ShowNameTags (1);

  // Player Class's
	AddPlayerClass(108,2010.7942,-977.7839,35.5584,205.6268,30,1000,28,1000,25,1000 );//
	AddPlayerClass(109,2010.7942,-977.7839,35.5584,205.6268,31,1000,32,1000,27,1000 );//
	AddPlayerClass(110, 2010.7942,-977.7839,35.5584,205.6268,29,1000,24,1000,26,1000);//
	AddPlayerClass(24,1268.9780,-774.8776,95.9643,271.4181,31,1000,29,1000,25,1000); //
	AddPlayerClass(25,1268.9780,-774.8776,95.9643,271.4181,30,1000,32,1000,27,1000); //

  // Car Spawns

	AddStaticVehicle(507,1241.5936,-784.1112,90.4138,356.9539,53,53); //
  AddStaticVehicle(426,1241.5458,-800.8099,88.8707,346.9272,53,53); //
  AddStaticVehicle(507,1247.9348,-770.7127,91.7121,349.1205,53,53); //
  AddStaticVehicle(521,1247.6152,-760.5258,92.7888,2.2807,53,53); //
  AddStaticVehicle(426,1246.3136,-749.7743,94.0978,9.1741,53,53); //
  AddStaticVehicle(521,1255.8652,-734.9267,93.9641,293.6600,53,53); //
  AddStaticVehicle(521,1262.3571,-742.7164,94.6220,295.8534,53,53); //
  AddStaticVehicle(507,1268.7791,-739.6047,94.2963,295.8534,53,53); //
  AddStaticVehicle(507,1251.6659,-725.3476,94.4226,118.5284,53,53); //
  AddStaticVehicle(521,1241.7017,-730.7644,95.1776,118.5284,53,53); //
  AddStaticVehicle(474,2033.4519,-978.9692,40.5321,294.6488,6,6); //
  AddStaticVehicle(576,2026.3047,-979.0865,38.7263,94.2819,6,6); //
  AddStaticVehicle(474,2027.6189,-982.8362,38.6760,274.2819,6,6); //
  AddStaticVehicle(576,2033.2075,-981.9511,40.2619,274.2819,6,6); //
  AddStaticVehicle(576,2040.0082,-980.6811,42.0850,274.2819,6,6); //
  AddStaticVehicle(576,2042.0410,-983.7855,42.5080,184.2818,6,6); //
  AddStaticVehicle(474,2037.5492,-984.3094,41.1936,94.2819,6,6); //
  AddStaticVehicle(461,2028.5708,-982.3179,38.9964,274.2819,6,6); //
  AddStaticVehicle(461,2026.2367,-984.3390,38.1118,274.2819,6,6); //
  AddStaticVehicle(461,2023.1825,-979.8481,37.9125,274.2819,6,6); //
  AddStaticVehicle(467,2019.2034,-984.3046,36.3059,274.2819,6,6); //
  AddStaticVehicle(467,2020.0173,-989.8168,35.6436,274.2819,6,6); //

  return 1;
}


SetPlayerTeamFromClass(playerid, classid)
{
  if (classid == 0)
  {
   gTeam[playerid] = TEAM_BODYGUARDS;
  }
  else
  {
   gTeam[playerid] = TEAM_VAGOS;
  }
}



public OnGameModeExit()
{
  return 1;
}



public OnPlayerSpawn(playerid)
{
  new PlayerName[MAX_PLAYER_NAME],
  string[128];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  format(string, sizeof(string), "%s has spawned.", PlayerName);
  SendClientMessageToAll(0xFFFFFFFF, string);
}

forward SetupPlayerForClassSelection(playerid);
public SetupPlayerForClassSelection(playerid)
{
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
	SetPlayerFacingAngle(playerid, 270.0);
	SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
	SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}

public OnPlayerConnect(playerid)
{
  GameTextForPlayer(playerid,"~w~Dogg's Bodyguards vs Vagos",5000,5);
  SendClientMessage(playerid,COLOR_YELLOW, "Welcome to Dogg's Bodyguards vs Vagos");
  gActivePlayers[playerid]++;
  gLastGaveCash[playerid] = GetTickCount();
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  new
    string[64],
    name[MAX_PLAYER_NAME];
  GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  switch(reason)
  {
    case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
    case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
    case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
  }
  SendClientMessageToAll(0xFFFFFFAA,string);
  return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
	  SetPlayerTeamFromClass(playerid, classid);

	  if(classid == 1)
	  {
	   GameTextForPlayer(playerid,"~r~Defend crib from Vagos",5000,4);
	   gPlayerClass[playerid] = 1;
	   SetPlayerPos(playerid,-385.2374,2205.9893,51.8531);
	   SetPlayerCameraPos(playerid,-379.7361,2207.0349,50.3879);
	   SetPlayerCameraLookAt(playerid,-385.2374,2205.9893,51.8531);
	   SetPlayerInterior(playerid,0);
	  }
	  else if(classid == 2)
	  {
	   GameTextForPlayer(playerid,"~r~Attack Madd Dogg's crib",5000,4);
	   gPlayerClass[playerid] = 2;
	   SetPlayerPos(playerid,-385.2374,2205.9893,51.8531);
	   SetPlayerCameraPos(playerid,-379.7361,2207.0349,50.3879);
	   SetPlayerCameraLookAt(playerid,-385.2374,2205.9893,51.8531);
	   SetPlayerInterior(playerid,0);
	  }
	  return 1;
}
Reply


Messages In This Thread
GAMEMODE PROBLEM ! - by samperzo - 02.06.2010, 18:48
Re: GAMEMODE PROBLEM ! - by Infinity - 02.06.2010, 18:48
Re: GAMEMODE PROBLEM ! - by azzerking - 02.06.2010, 21:48
Re: GAMEMODE PROBLEM ! - by IcyBlight - 02.06.2010, 22:44
Re: GAMEMODE PROBLEM ! - by xxjackoxx - 02.06.2010, 23:09
Re: GAMEMODE PROBLEM ! - by sjvt - 02.06.2010, 23:28
Re: GAMEMODE PROBLEM ! - by aircombat - 02.06.2010, 23:31
Re: GAMEMODE PROBLEM ! - by samperzo - 03.06.2010, 08:48

Forum Jump:


Users browsing this thread: 7 Guest(s)