[Ayuda]No Me Deja Spawnear y no muestra los Skin.
#1

Bueno tengo el sigueinte problema que cuando entro a jugar a mi servidor con mi gamemodo (Credo desde 0) no me muestra los skin y le doy respawn y no pasa nada solo sale la imagen del puerto de LS Y las flechas sera que me podrias ayudar.

Este es el Codigo de Mi Gamemodo.

Код:
//Gamemodo Creado Desde 0 By ShutDown//

#include <a_samp>
static gTeam[MAX_PLAYERS];


#define Grove 1
#define Ballas 2
#define Color_Grove 0x33AA33AA //Color Verde para los Grove
#define Color_Ballas 0x800080AA //Color Violeta Para Los Ballas

forward SetPlayerTeamFromClass(playerid, classid);
forward SetPlayerToTeamColor(playerid);
main()
{
  print("\n----------------------------------");
  print("      Los Santos-War.");
  print("     By ShutDown.");
  print("----------------------------------\n");
}

public OnGameModeInit()
{

	SetGameModeText("LS-War");
	//Personajes a Elejir//
	AddPlayerClass(107,2520.7722,-1679.5956,15.1774,204.1930,0,0,0,0,0,0); // Grove 1
  AddPlayerClass(102,2212.7917,-1155.6124,25.7266,67.8531,0,0,0,0,0,0); // 1312
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	if(classid == 107){
	  SetPlayerPos(playerid,2489.2221,-1656.2525,13.3606);
    SetPlayerCameraPos(playerid,2489.3806,-1661.4866,13.3359);
    SetPlayerCameraLookAt(playerid,2489.2221,-1656.2525,13.3606);
    GameTextForPlayer(playerid, "~g~Grove", 1000, 3);

	}
  if(classid == 102){
   SetPlayerFacingAngle(playerid, 180.0);
   SetPlayerPos(playerid,1881.9139,-1255.8211,13.5468);
   SetPlayerCameraPos(playerid,1879.5007,-1260.9143,13.3906);
   SetPlayerCameraLookAt(playerid,1881.9139,-1255.8211,13.5468);
   GameTextForPlayer(playerid, "~p~Ballas", 1000, 4);

	}
}


public SetPlayerTeamFromClass(playerid, classid)
{
  if (classid == 107)
  {
    gTeam[playerid] = Grove;
  }
  if (classid ==102)
  {
    gTeam[playerid] = Ballas;
  }
}

public OnPlayerConnect(playerid)
{
	new string[64], pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s a Entrado al Servidor!",pName);
  SendClientMessageToAll(0x33AA33AA,string);
	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 salio del server.(Time Out)",name);
	case 1: format(string,sizeof string,"%s salio del server.(Por Su Cuenta)",name);
	case 2: format(string,sizeof string,"%s salio del server.(Baneado/KICKEADO)",name);
 }
 SendClientMessageToAll(0xFFFFFFAA,string);
 return 1;
 }
 
public SetPlayerToTeamColor(playerid)
{
	if (gTeam[playerid] == Grove)
	{
		SetPlayerColor(playerid, Color_Grove);
	}
	else if (gTeam[playerid] == Ballas)
	{
		SetPlayerColor(playerid, Color_Ballas);
	}
}

public OnPlayerDeath(playerid, killerid, reason)
{
  if (killerid != INVALID_PLAYER_ID) {
    //teamkill? very bad, punish the player
    if (gTeam[playerid] == gTeam[killerid]) {
    new string[128], playername[MAX_PLAYER_NAME];
    SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "%s Ha matado a un compaсero de su equipo", playername);
    SendClientMessageToAll(0xFFFFFFAA, string);

    }
    else {
      SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
      
    }
  }
  SendDeathMessage(killerid, playerid, reason);
  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);
}
Reply
#2

En vez de

pawn Код:
#define Grove 1
#define Ballas 2
pon:

pawn Код:
#define TEAM_GROVE 0
#define TEAM_BALLAS 1
Cambia:

pawn Код:
public SetPlayerTeamFromClass(playerid, classid)
{
  if (classid == 107)
  {
    gTeam[playerid] = Grove;
  }
  if (classid ==102)
  {
    gTeam[playerid] = Ballas;
  }
}
por:

Код:
public OnPlayerRequestClass(playerid, classid)
{
  gPlayerClass[playerid] = classid;

	switch (classid) {

		case 0:

		  {
        gTeam[playerid] = TEAM_ARMY;
				GameTextForPlayer(playerid, "~g~Army", 1000, 6);
				ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);

			}
	  case 1:

      {
        gTeam[playerid] = TEAM_ARMY;
	GameTextForPlayer(playerid, "~g~Army", 1000, 6);
			} 
  return 1;
}
NOTA: Estoy seguro de que no saldrб correctamente aquн puesto, intenta ordenarlo.
Reply
#3

Amigo e puesto lo que pusiste pero ahora me deja los siguientes errores. y todos forman en la misma linea.

estos son los errores:

Код:
C:\Documents and Settings\Usuario\Escritorio\Server\gamemodes\ls-war.pwn(35) : error 017: undefined symbol "gPlayerClass"
C:\Documents and Settings\Usuario\Escritorio\Server\gamemodes\ls-war.pwn(35) : warning 215: expression has no effect
C:\Documents and Settings\Usuario\Escritorio\Server\gamemodes\ls-war.pwn(35) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Usuario\Escritorio\Server\gamemodes\ls-war.pwn(35) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Usuario\Escritorio\Server\gamemodes\ls-war.pwn(35) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
y esta es el codigo de la linea 35.

Код:
gPlayerClass[playerid] = 107;
Sera que lo tengo que forward co algo asi por que como no pusiste nada de forward no lo ise.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)