pomoc oko player spawna

Započeo | MARKO |, April 30, 2010, 09:47:42 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

kako mogu promjeniti da mi se civili spawnaju nda drugom mjestu??
i kako da nakon sto umres dase spawnas kod svoje kuce.

Evo ti moj onplayerspawn -.-

public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
   if(PlayerInfo[playerid][pTut] == 0)
   {
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1; gAdminChat[playerid] = 0; gReportMuted[playerid] = 0; gABroadCast[playerid] = 0;
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Dobrodosli na Genius Gaming server, molimo vas ispunite sljedece informacije.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Jeste li musko ili zensko?.");
   }
new rand;
new house = PlayerInfo[playerid][pPhousekey];
if(PlayerPaintballing[playerid] != 0)
{
   ResetPlayerWeapons(playerid);
      GivePlayerWeapon(playerid, 29, 999);
   rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
   return 1;
}
if(PlayerInfo[playerid][pJailed] == 1)
{
   SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
SendClientMessage(playerid, COLOR_LIGHTRED, "Nedovrsena zatvorska kazna,natrag u zatvor.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
   SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
return 1;
}
if(PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50.0);
   /*SetPlayerInterior(playerid, 5);
       rand = random(sizeof(gMedicSpawns));
SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
       TogglePlayerControllable(playerid, 0);
       GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your ~r~wounds~y~...", 35000, 3);
       MedicTime[playerid] = 1;
       if(PlayerInfo[playerid][pDonateRank] > 0)
       {
           NeedMedicTime[playerid] = 30;
       }
       else
       {
        NeedMedicTime[playerid] = 60;
}
       PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
   return 1;*/
}
if(house !=255)
{
   if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
   {
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
return 1;
}
}
if(PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
   SetPlayerToTeamColor(playerid);
   SetPlayerInterior(playerid, 3);
   SetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
   PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
   return 1;
}
   if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Just PD
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1568.9999,-1693.5121,5.8906);
PlayerInfo[playerid][pInt] = 0;
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 24, 400);
GivePlayerWeapon(playerid, 41, 999);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 34, 200);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
return 1;
   }
   if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//Just FBI
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1791.0869,-1692.2885,13.4774);
PlayerInfo[playerid][pInt] = 0;
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 24, 400);
GivePlayerWeapon(playerid, 41, 999);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 34, 200);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
return 1;
   }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//Just SWAT
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 308.5120,-1517.6775,24.9219);
PlayerInfo[playerid][pInt] = 0;
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 24, 400);
GivePlayerWeapon(playerid, 41, 999);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 34, 200);
GivePlayerWeapon(playerid, 27, 200);
GivePlayerWeapon(playerid, 16, 50);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
return 1;
   }
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//G
{
   SetPlayerToTeamColor(playerid);
   SetPlayerInterior(playerid, 0);
   SetPlayerPos(playerid, 1757.0377,-1921.3490,13.5731);
   PlayerInfo[playerid][pInt] = 0;
  GivePlayerWeapon(playerid,4,1);
   GivePlayerWeapon(playerid,24,100);
   return 1;
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Yakuze spawn
{
   SetPlayerToTeamColor(playerid);
   SetPlayerInterior(playerid, 0);
   SetPlayerPos(playerid,1237.6898,-1671.2350,11.7969);
   PlayerInfo[playerid][pInt] = 0;
   GivePlayerWeapon(playerid,4,1);
   GivePlayerWeapon(playerid,24,100);
   return 1;
}
   if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 ) // Hitman spawn
   {
       SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 1727.6760,-1912.3636,13.5635);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
       return 1;
   }
   if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //CNN
   {
       SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 765.4187,-1333.7709,13.5420);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
       return 1;
   }
   if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //RM
   {
       SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 993.9631,-1434.2954,13.5469);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
GivePlayerWeapon(playerid,4,1);
   GivePlayerWeapon(playerid,24,100);
       return 1;
   }
    if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //Ballas
    {
        SetPlayerToTeamColor(playerid);
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 1258.7571,-784.6541,92.0302);
        PlayerInfo[playerid][pInt] = 0;
GivePlayerWeapon(playerid,4,1);
   GivePlayerWeapon(playerid,24,100);
        return 1;
    }
   if(IsAnInstructor(playerid)) //Driving/Flying School spawn
   {
if(SchoolSpawn[playerid] == 0)
{
       SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 657.9948,-1274.7823,13.6331);
SetPlayerFacingAngle(playerid, 3.1098);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else if(SchoolSpawn[playerid] == 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 414.4144,2531.9580,19.1565);
SetPlayerFacingAngle(playerid, 4.6505);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
       return 1;
   }
   if ((gTeam[playerid]) == 1)
   {
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gMedPlayerSpawns));
SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}
SetPlayerToTeamColor(playerid);
if(PlayerInfo[playerid][pOrigin] == 1)//USA
{
   SetPlayerPos(playerid,1129.0839,-1489.7538,22.7690);
SetPlayerFacingAngle(playerid, 46.8583);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerInfo[playerid][pOrigin] == 2)//Europe
{
   SetPlayerPos(playerid,1129.0839,-1489.7538,22.7690);
SetPlayerFacingAngle(playerid, 262.9963);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else if(PlayerInfo[playerid][pOrigin] == 3)//Asia
{
   SetPlayerPos(playerid,1129.0839,-1489.7538,22.7690);
SetPlayerFacingAngle(playerid, 272.3543);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,15);
PlayerInfo[playerid][pInt] = 15;
}
return 1;
}
return 1;
}
Poslednja Izmena: April 30, 2010, 10:24:28 PRE PODNE od GGC
Aequam memento rebus in arduis servare mentem.

vidiš ovdje u onplayer spawn ovo :
Citatelse if(PlayerInfo[playerid][pOrigin] == 2)//Europe 
      { 
          SetPlayerPos(playerid,1129.0839,-1489.7538,22.7690); 
         SetPlayerFacingAngle(playerid, 262.9963); 
         SetPlayerInterior(playerid,0); 
         PlayerInfo[playerid][pInt] = 0; 
      } 

u svojoj skripti naÄ'i //Europe i ove kordinate :

Citat1129.0839,-1489.7538,22.7690

promjeni u one di če ti bit spawn i tako za Usa i Asia ;)