Spawn Problems!
#1

hy!
i have a problem!i have added some teams..and onplayerrequestspawn ,when i choose a skin,it spawns it in the sky! but the team_civils is spawned on the ground! it is strange! and i don't know what is the problem! lol..

// Teams
#define TEAM_COP 1
#define TEAM_MEDIC 2
#define TEAM_CARFIX 3
#define TEAM_CASSEC 4
#define TEAM_DRIVER 5
#define TEAM_BISTRO 6
#define TEAM_JAILTK 7
#define TEAM_PVTMED 8
#define TEAM_CIVIL 9
#define TEAM_GASDEL 10
#define TEAM_DRGDEL 11
#define TEAM_HITMAN 12
#define TEAM_GUNDEL 13
#define TEAM_SNITCH 14
#define TEAM_RAPIST 15
#define TEAM_BOUNTY 16
#define TEAM_KIDNAP 17
#define TEAM_PILOT 18
#define TEAM_GROVE 19
#define TEAM_BALLAS 20
#define TEAM_VAGOS 21
#define TEAM_AZTECAS 22
#define TEAM_NANG 23
#define TEAM_MAFIA 24
#define TEAM_RMAFIA 25
#define TEAM_TRIADS 26
#define TEAM_BIKERS 27
#define TEAM_ARMY 28


Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
////LoopingAnim(playerid, "BENCHPRESS", "GYM_BP_CELEBRATE", 4.0, 1, 0, 0, 0, 0);
switch (classid) {
 case 0,1,2,3,4,5,6,7,8,9:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5);
SetPlayerInterior(playerid, 3);
SetPlayerFacingAngle(playerid, 278.0276);
SetPlayerPos(playerid, 230.5686,165.0502,1003.0234);
SetPlayerCameraPos( playerid, 233.1806, 163.3041, 1003.6234 );
SetPlayerCameraLookAt( playerid, 225.1943, 169.3222, 1003.6234 );
ApplyAnimation(playerid,"POLICE","CopTraf_Stop",4.1,0,1,1,1,1);
			}
 case 11,12,13:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~p~BALLAS!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
		case 14,15,16:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~g~GROVE STREET!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 17,18,19:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~y~VAGOS!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 20,21,22:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~b~AZTECAS!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 23,24,25:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~p~NANG!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 26,27,28:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~p~MAFIA!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 29,30,31:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~r~MAFIA RUSEASCA!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 32,33,34:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~p~TRIADS!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 36:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~b~BIKERS!", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 37:
    {
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~w~CASINO SECURITY", 3000, 5);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,271.3871);
SetPlayerPos(playerid, 2022.0471,1007.7247,15.2519);
SetPlayerCameraPos( playerid, 2025.2393, 1008.9281, 15.8518 );
SetPlayerCameraLookAt( playerid, 2015.5363, 1006.5089, 16.8971 );
//LoopingAnim(playerid, "PED", "ENDCHAT_03", 4.0, 1, 0, 0, 0, 0);
			}
case 38,39:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~b~JAIL TURNKEY~n~~w~(RELEASE PRISONERS)", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "PED", "FLEE_LKAROUND_01", 4.0, 1, 0, 0, 0, 0);
      }
case 40,41,42,43:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~b~MEDIC", 3000, 5);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,3.8960);
SetPlayerPos(playerid, 1609.5793,1848.4839,10.8203);
SetPlayerCameraPos( playerid, 1608.4257, 1850.3918, 10.9203 );
SetPlayerCameraLookAt( playerid, 1611.9958, 1841.0915, 11.7918 );
//LoopingAnim(playerid, "SMOKING", "M_SMK_IN", 4.0, 1, 0, 0, 0, 0);
			}

case 44:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~w~CAR MECHANIC", 3000, 5);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,151.5528);
SetPlayerPos(playerid, 2382.3950,1035.1743,10.8203);
SetPlayerCameraPos( playerid, 2380.0483, 1033.0675, 10.7203 );
SetPlayerCameraLookAt( playerid, 2385.7133, 1041.1582, 12.2846 );
//LoopingAnim(playerid, "FIGHT_C", "FIGHTC_IDLE", 4.0, 1, 0, 0, 0, 0);
			}
case 45,46,47:
	{

TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~w~BISTRO STAFF", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "FOOD", "SHP_THANK", 4.0, 1, 0, 0, 0, 0);
			}

case 48,49:
	    {
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~g~TAXI DRIVER", 3000, 5);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,127.0933);
SetPlayerPos(playerid, 1683.4829,1315.5654,10.8203);
SetPlayerCameraPos( playerid, 1681.4537, 1314.0895, 11.4203 );
SetPlayerCameraLookAt( playerid, 1689.6452, 1319.8253, 11.5948 );
//LoopingAnim(playerid, "MISC", "SCRATCHBALLS_01", 4.0, 1, 0, 0, 0, 0);
			}
case 50:
	    {
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
//SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid, "~g~ARMY", 3000, 5);
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);
SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);
ApplyAnimation(playerid,"POLICE","CopTraf_Stop",4.1,0,1,1,1,1);
//LoopingAnim(playerid, "MISC", "SCRATCHBALLS_01", 4.0, 1, 0, 0, 0, 0);
			}
case 51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110:
	{
TextDrawShowForPlayer(playerid,lbt);
TextDrawShowForPlayer(playerid,lbb);
GameTextForPlayer(playerid, "~w~CIVIL~b~~n~Aleceti un job cand incepi jocul", 3000, 5);
 }
}
return 1;
}
i think this could be the problem
Код:
SetPlayerTeamFromClass(playerid, classid) {

if (classid >= 0 && classid <= 9)
{

		gTeam[playerid] = TEAM_COP;

	}
	
else if(classid == 50) {

	  gTeam[playerid] = TEAM_ARMY;

	}
else	if(classid == 37)
    {

	  gTeam[playerid] = TEAM_CASSEC;

	}
  else if (classid == 38 || classid == 39)
	{

	  gTeam[playerid] = TEAM_JAILTK;

	}
	else if (classid == 40 || classid == 41 || classid == 42 || classid == 43) {

	  gTeam[playerid] = TEAM_MEDIC;

 	}
	 else if (classid == 44) {

	  gTeam[playerid] = TEAM_CARFIX;

	}
	else if (classid == 45 || classid == 46 || classid == 47)
	{

	  gTeam[playerid] = TEAM_BISTRO;

	}
	else if (classid == 48 || classid == 49)
	    {

	  gTeam[playerid] = TEAM_DRIVER;

  }
	else if(classid >= 14 && classid <= 16)
	{

	  gTeam[playerid] = TEAM_GROVE;

  }
  else if (classid >= 11 && classid <= 13)
  {
  gTeam[playerid] = TEAM_BALLAS;
  }
  else if (classid >= 17 && classid <= 19)
	{
  gTeam[playerid] = TEAM_VAGOS;
  }
  else if (classid >= 20 && classid <= 22)
	{
  gTeam[playerid] = TEAM_AZTECAS;
  }
  else if (classid >= 23 && classid <= 25)
  {
  gTeam[playerid] = TEAM_NANG;
  }
  else if (classid >= 26 && classid <= 28)
	{
  gTeam[playerid] = TEAM_MAFIA;
  }
  else if (classid >= 29 && classid <= 31)
  {
  gTeam[playerid] = TEAM_RMAFIA;
  }
 else if (classid >= 32 && classid <= 35)
	{
  gTeam[playerid] = TEAM_TRIADS;
  }
  else if (classid == 36)
  {
  gTeam[playerid] = TEAM_BIKERS;
  }
	else
	{
	 gTeam[playerid] = TEAM_CIVIL;
	}

}

SOLVED
Reply
#2

Hey,

did you make a spawn in an interior for the civils

When that is true, you have to set the interior if the civil_skin was chosen
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)