[Pomoc] Promjena spawn mjesta

Započeo Niko_Djuric, Mart 17, 2013, 19:11:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: BE editovan
Detaljan opis problema: Pozz, zanima me kako da promjenim mjesto spawna na serveru..spawna mi se na aerodromu a ja hocu da mi se spawna npr kod autobuske itd. Ako moze detaljno objasnjenje, nov sam u svemu ovome.. Hvala unaprijed
Dio skripte: /

Nadji u skripti public OnPlayerSpawn ili public SetPlayerSpawn ili tako nesto,trebalo bi da je tu negde :)
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP

ima public on player spawn http://clip2net.com/s/4LMRSl , a ima i public SetPlayerSpawn.. http://clip2net.com/s/4LMSHk al ne kontam sta trebam da izmjenim, i kako da nadjem interior kako se vec zove kada ukucam /save ingame..

De nam citav onplayerspawn stavi u code

Posto ti se ne vidi dole ti je to ispod..
Moji Radiovi!
TuT||Iz code u MTA

Pod public OnPlayerSpawn imas ovo SetPlayerPos u ovome SetPlayerPos imaš koordinate spawna.Ti udjes u igricu, odeš na mesto gde hoćeš da ti se igrač spawna i kucaš /save.Tako sačuvaš tu poziciju i samo je ubacis umesto ove stare.Pokušao sam ovako bez koda ali bi bilo najbolje da das kod. :)
BIG RESPECT:Blaeks, SABO(T), |LG|Yui_Sang, Joey_

Kopirao sam mozda i sto ne treba, ali evo ispod kod

public OnPlayerSpawn(playerid)
{

    GangZoneShowForPlayer(playerid, Grove, 16711888);
    GangZoneShowForPlayer(playerid, TEC, 199);
    GangZoneShowForPlayer(playerid, TRM, 199);
    GangZoneShowForPlayer(playerid, Vagos, -8388424);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(IsPlayerNPC(playerid))//Proverava da li je to NPC Botina
     {
          new npc_name[24];
          GetPlayerName(playerid,npc_name,sizeof(npc_name));
          if(!strcmp(npc_name,"ImeBotine",false))
          {
               SetPlayerSkin(playerid,268);//Stavlja botini skin
               ImeBotine = Create3DTextLabel("Dzon_Botti",0x008080FF,30.0,40.0,50.0,40.0,0);//Ovde stavimo kordinate i sta ce da pise na 3DTextu
               Attach3DTextLabelToPlayer(ImeBotine, playerid, 0.0, 0.0, 0.0);//Kacimo 3DText na Botinu
        }
return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
   TextDrawHideForPlayer(playerid, Te0);
   TextDrawHideForPlayer(playerid, Te1);
   TextDrawHideForPlayer(playerid, Te2);
   TextDrawHideForPlayer(playerid, Te3);
   TextDrawHideForPlayer(playerid, Te4);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, Textdraw8);
    TextDrawShowForPlayer(playerid, Textdraw9);
    TextDrawShowForPlayer(playerid, Greedy0);
    TextDrawShowForPlayer(playerid, se0);
    TextDrawShowForPlayer(playerid, BalkanEvolutio);
    TextDrawShowForPlayer(playerid, x12);
//    TextDrawShowForPlayer(playerid, Text10);
    TextDrawShowForPlayer(playerid, ox);
//   TextDrawShowForPlayer(playerid, Text11);
//    TextDrawShowForPlayer(playerid, Text12);
    TextDrawShowForPlayer(playerid, Text13);
    TextDrawShowForPlayer(playerid, Text14);
    TextDrawShowForPlayer(playerid, Text15);
    TextDrawShowForPlayer(playerid, Text16);
//    TextDrawShowForPlayer(playerid, se1);
//    TextDrawShowForPlayer(playerid, se2);
//    TextDrawShowForPlayer(playerid, se3);
//    TextDrawShowForPlayer(playerid, se4);
    TextDrawShowForPlayer(playerid, se5);
//  TextDrawShowForPlayer(playerid, se6);
   TextDrawShowForPlayer(playerid, forum0);
   TextDrawShowForPlayer(playerid, srvpor0);
   TextDrawShowForPlayer(playerid, srvpor1);
///----------------------------------------------------
   /* TextDrawShowForPlayer(playerid, logo0);
   TextDrawShowForPlayer(playerid, logo1); */

   
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
   InitLockDoors(playerid);
   STDPlayer[playerid] = 0;
   gTeam[playerid] = PlayerInfo[playerid][pTeam];
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
   if (gTeam[playerid] == 4)
   {
      gTeam[playerid] = 3;
   }
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////
   if(gPlayerLogged[playerid] == 0 && IsPlayerNPC(playerid) != 1)
   {
       SendClientMessage(playerid, COLOR_LIGHTRED, "** Ovaj server zahtjeva prvo da se prijavite prije spawnanja (Kikovan) **");
        KickPlayer[playerid] = 1;
   }
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////
   if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
   {
       MedicBill[playerid] = 0;
       new rand = random(sizeof(CIV));
      SendClientMessage(playerid, COLOR_LIGHTRED, "Niste prihvaceni Lider, sada ste civil !");
      PlayerInfo[playerid][pTeam] = 3;
      gTeam[playerid] = 3;
      SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
      PlayerInfo[playerid][pModel] = CIV[rand];
      SpawnPlayer(playerid);
   }
   if(gTeam[playerid] == 5)
   {
       if(PlayerInfo[playerid][pMember] < 1)
       {
           MedicBill[playerid] = 0;
           new rand = random(sizeof(CIV));
         SendClientMessage(playerid, COLOR_LIGHTRED, "Niste clan Organizacije, sada ste civil !");
         PlayerInfo[playerid][pTeam] = 3;
         gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
         PlayerInfo[playerid][pModel] = CIV[rand];
         SpawnPlayer(playerid);
      }
   }
   if(gTeam[playerid] == 10)
   {
       if(PlayerInfo[playerid][pMember] != 8)
       {
           MedicBill[playerid] = 0;
           new rand = random(sizeof(CIV));
         SendClientMessage(playerid, COLOR_LIGHTRED, "Niste clan ove agencije, sada ste civil !");
         PlayerInfo[playerid][pTeam] = 3;
         gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
         PlayerInfo[playerid][pModel] = CIV[rand];
         SpawnPlayer(playerid);
      }
   }
   if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3)
   {
       MedicBill[playerid] = 0;
      new rand = random(sizeof(CIV));
      SendClientMessage(playerid, COLOR_LIGHTRED, "Niste se prijavili za Policiju / BIA / SWAT, sada ste civil !");
      PlayerInfo[playerid][pTeam] = 3;
      gTeam[playerid] = 3;
      SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
      PlayerInfo[playerid][pModel] = CIV[rand];
      SpawnPlayer(playerid);
   }
   if(gTeam[playerid] == 3)
   {
       if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
       {
         SendClientMessage(playerid, COLOR_LIGHTRED, "Niste clan Org, premjesteni ste na odgovarajucu Klasu + Char !");
         MedicBill[playerid] = 0;
         new model = PlayerInfo[playerid][pChar];
         if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         else if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
         SpawnPlayer(playerid);
      }
   }
   if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
   else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
   SetPlayerWeapons(playerid);
   SetPlayerSpawn(playerid);
   SetPlayerToTeamColor(playerid);
   PlayerFixRadio(playerid);

   if(MapIconsShown[playerid] != 1)
   {
       MapIconsShown[playerid] = 1;
       for(new i = 0; i < sizeof(BizzInfo); i++)
      {
         SetPlayerMapIcon(playerid,i + 1,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ],36,COLOR_LIGHTRED);
      }
      for(new i = 0; i < sizeof(SBizzInfo); i++)
      {
          SetPlayerMapIcon(playerid,i + 20,SBizzInfo[sbEntranceX],SBizzInfo[sbEntranceY],SBizzInfo[sbEntranceZ],36,COLOR_LIGHTRED);
      }
   }
   return 1;
}
public CKLog(string[])
{
   new entry[256];
   format(entry, sizeof(entry), "%s\n",string);
   new File:hFile;
   hFile = fopen("logs/ck.log", io_append);
   fwrite(hFile, entry);
   fclose(hFile);
}

public PayLog(string[])
{
   new entry[256];
   format(entry, sizeof(entry), "%s\n",string);
   new File:hFile;
   hFile = fopen("logs/pay.log", io_append);
   fwrite(hFile, entry);
   fclose(hFile);
}

public KickLog(string[])
{
   new entry[256];
   format(entry, sizeof(entry), "%s\n",string);
   new File:hFile;
   hFile = fopen("logs/kick.log", io_append);
   fwrite(hFile, entry);
   fclose(hFile);
}

public BanLog(string[])
{
   new entry[256];
   format(entry, sizeof(entry), "%s\n",string);
   new File:hFile;
   hFile = fopen("logs/ban.log", io_append);
   fwrite(hFile, entry);
   fclose(hFile);
}

public OnPlayerEnterCheckpoint(playerid)
{
   new string[128];
   new string2[128];
    new carid = GetPlayerVehicleID(playerid);

SetPlayerSpawn, tamo pronadji SetPlayerPos

evo ja mislim da je ovo

if(PlayerInfo[playerid][pJailed] == 2)
      {
          SetPlayerInterior(playerid, 0);
          PlayerInfo[playerid][pInt] = 0;
         JBC_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;
      }

E ja sada ne znam sto znaci kod tebe ta varijabla, pogotovo ako je "2"...
Probaj pronaci jos neku

imaju dvije, a ostale su za organizacije

forward TextDrawregistracija2(playerid);
public TextDrawregistracija2(playerid)
{
    PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
    PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
    TextDrawHideForPlayer(playerid, regis0);
   TextDrawHideForPlayer(playerid, regis1);
   TextDrawHideForPlayer(playerid, regis2);
   TextDrawHideForPlayer(playerid, regis3);
   TextDrawHideForPlayer(playerid, regis4);
   TextDrawHideForPlayer(playerid, regis5);
   TextDrawHideForPlayer(playerid, regis6);
   TextDrawHideForPlayer(playerid, regis7);
   TextDrawHideForPlayer(playerid, regis8);
   SetPlayerInterior(playerid, 0);
   TogglePlayerControllable(playerid, 0);
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
   SendClientMessage(playerid,0x9292D5FF,"");
    TextDrawShowForPlayer(playerid, Te0);
    TextDrawShowForPlayer(playerid, regis10);
   TextDrawShowForPlayer(playerid, regis11);
   TextDrawShowForPlayer(playerid, regis12);
   TextDrawShowForPlayer(playerid, regis13);
   TextDrawShowForPlayer(playerid, regis14);
   TextDrawShowForPlayer(playerid, regis15);
   TextDrawShowForPlayer(playerid, regis16);
   TextDrawShowForPlayer(playerid, regis17);
   TextDrawShowForPlayer(playerid, regis18);
   SetPlayerFacingAngle(playerid, 139.7829);
    JBC_SetPlayerPos(playerid, 1192.6627,-1692.2067,13.1610);
   SetPlayerCameraPos(playerid, 1151.18, -1692.61, 34.58);
    SetPlayerCameraLookAt(playerid, 1152.99, -1697.27, 32.49);
   SetPlayerWeather(playerid, 1);
   new plname[MAX_PLAYER_NAME];
   GetPlayerName(playerid, plname, sizeof(plname));
   SetTimerEx("TextDrawregistracija3",9000, false, "i", playerid);
   return 1;
   }
___________________________________________________
forward randomlogin(playerid);
public randomlogin(playerid)
{
            new RandomStart;
            RandomStart = random(6);
            switch(RandomStart)
            {
                  case 0:
                  {
                  JBC_SetPlayerPos(playerid, 1327.7601,-946.7955,38.3527);
              SetPlayerFacingAngle(playerid, 139.7829);
                  SetPlayerCameraPos(playerid, 1374.83, -915.02, 37.12);
                  SetPlayerCameraLookAt(playerid, 1376.45, -910.67, 38.98);
                  SetTimerEx("TextDrawpokazi",7, false, "i", playerid);
                  }
                  case 1:
                  {
                  JBC_SetPlayerPos(playerid, 1507.4445,-1661.7773,13.7969);
              SetPlayerFacingAngle(playerid, 139.7829);
                  SetPlayerCameraPos(playerid, 1456.16, -1605.29, 13.38);
                  SetPlayerCameraLookAt(playerid, 1459.40, -1609.10, 14.64);
                  SetTimerEx("TextDrawpokazi",7, false, "i", playerid);
                  }
                  case 2:
                  {
                  JBC_SetPlayerPos(playerid, 1974.0229,-1155.0980,20.9518);
              SetPlayerFacingAngle(playerid, 139.7829);
                  SetPlayerCameraPos(playerid, 1876.73, -1308.70, 91.50);
                  SetPlayerCameraLookAt(playerid, 1879.75, -1304.72, 89.44);
                  SetTimerEx("TextDrawpokazi",7, false, "i", playerid);
                  }
                  case 3:
                  {
                  JBC_SetPlayerPos(playerid, 1989.7533,-775.2012,132.1034);
              SetPlayerFacingAngle(playerid, 139.7829);
                  SetPlayerCameraPos(playerid, 1987.48, -806.35, 133.87);
                  SetPlayerCameraLookAt(playerid, 1983.35, -809.17, 133.91);
                  SetTimerEx("TextDrawpokazi",7, false, "i", playerid);
                  }
                  case 4://new
                  {
                  JBC_SetPlayerPos(playerid, 385.4012,-2031.7555,7.8359);
              SetPlayerFacingAngle(playerid, 139.7829);
                  SetPlayerCameraPos(playerid, 418.62, -1976.08, 3.44);
                  SetPlayerCameraLookAt(playerid, 414.86, -1979.39, 5.08);
                  SetTimerEx("TextDrawpokazi",7, false, "i", playerid);
                  }
                  case 5:
                  {
                  JBC_SetPlayerPos(playerid, -240.4429,2610.2747,62.7031);
              SetPlayerFacingAngle(playerid, 139.7829);
                  SetPlayerCameraPos(playerid, -174.86, 2624.77, 64.67);
                  SetPlayerCameraLookAt(playerid, -177.79, 2628.82, 64.93);
                  SetTimerEx("TextDrawpokazi",7, false, "i", playerid);
                  }
                  }
    return 1;
}

Ma mislio sam pod SetPlayerSpawn da pronadjes jos jedan SetPlayerPos