[POMOC] Stvaranje na mestu spawna pri ulasku u IG

Započeo DjokoÅ¡, Novembar 22, 2012, 18:50:45 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: LSRP3
Detaljan opis problema: Igram na srw i izadjem pa opet udjem i stvorim se tu de sam i bio poslednji put,a ne spawnam se na mesto spawna.
Dio skripte: Nzm sta da dam.
Neke slike/video za lakse dobivanje pomoci(neobavezno):  /
prst prst u cupi,prst prst u anus



Evo ti ako ti je za LARP onda ti treba ovako... Samo dodas tvoje koordinate...

public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
    if(!IsPlayerNPC(playerid))
    {
    if(PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 3)
{
SetPlayerSkin(playerid, 294);
if(PlayerInfo[playerid][pAdmin] >= 6)
{
SafeResetPlayerWeapons(playerid);
SafeGivePlayerWeapon(playerid, 42, 10000);
SafeGivePlayerWeapon(playerid, 39, 10000);
SafeGivePlayerWeapon(playerid, 38, 10000);
SafeGivePlayerWeapon(playerid, 34, 10000);
SafeGivePlayerWeapon(playerid, 31, 10000);
SafeGivePlayerWeapon(playerid, 29, 10000);
SafeGivePlayerWeapon(playerid, 27, 10000);
SafeGivePlayerWeapon(playerid, 24, 10000);
SafeGivePlayerWeapon(playerid, 40, 1);
SafeGivePlayerWeapon(playerid, 10, 1);
SafeGivePlayerWeapon(playerid, 9, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1000);
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
}
}
    if(Spectate[playerid] != 255)
{
    SafeSetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
    SafeSetPlayerInterior(playerid, Interior[playerid]);
    SetPlayerVirtualWorld(playerid, VirWorld[playerid]);
    if(PlayerInfo[playerid][pAdmin] >= 6)
    {
        if(PlayerInfo[playerid][pAdminDuty] == 1)
        {
    SetPlayerHealth(playerid, SpHealth[playerid]);
    SetPlayerArmour(playerid, SpArmour[playerid]);
}
else
{
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
}
else
{
    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
    SetPlayerWeapons(playerid);
    SetPlayerToTeamColor(playerid);
    Spectate[playerid] = 255;
    TextDrawShowForPlayer(playerid, Textdraw44);
    TextDrawShowForPlayer(playerid, Textdraw45);
    TextDrawShowForPlayer(playerid, Textdraw55);
    TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw54[playerid]);
    if(PlayerInfo[playerid][pWatch] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw56);
TextDrawShowForPlayer(playerid, Textdraw57);
TextDrawShowForPlayer(playerid, Textdraw58);
}
    return 1;
}
    if(PlayerInfo[playerid][pAndro] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "US Airlines: medicinara ste spremili, Povrat na svoje putovanje!");
      SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
      SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
      SafeSetPlayerPos(playerid, 315.745,984.969,1958.919);
      return 1;
}
if(PlayerInfo[playerid][pJet] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "US Airlines: medicinara ste spremili, Povrat na svoje putovanje!");
    SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
      SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
      SafeSetPlayerPos(playerid, 3.7333,23.0483,1199.6012);
      return 1;
}
    if(PlayerInfo[playerid][pTut] == 0)
    {
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid, 330.6825,163.6688,1014.1875);
SetPlayerFacingAngle(playerid, 280);
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "Dobrodosli na Balkan Strong  RPG Server, sada cete u Los Santo imigracijsko srediste.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Zdravo! Dobrodosli u Los Santo imigracijsko srediste, ja cu Vam postaviti nekoliko pitanja.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Prvo Pitanje: Jeste li Musko ili Zensko?");
SendClientMessage(playerid, COLOR_LIGHTRED, "Savjet: Molimo upisi u ono sto jesi! Ne brini, nitko nece vidjeti!");
PlayerInfo[playerid][pRegularCount] = 144000;
    SafeGivePlayerMoney(playerid,3000);
return 1;
}
new rand;
new house = PlayerInfo[playerid][pPhousekey];
if(PlayerInfo[playerid][pJailed] == 1)
{
    SafeSetPlayerInterior(playerid, 6);
SafeSetPlayerPos(playerid,264.6288,77.5742,1001.0391);
SendClientMessage(playerid, COLOR_LIGHTRED, "Ne izvrsena zatvorska kazna,vracate se u zatvor.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
    SafeSetPlayerInterior(playerid, 0);
SafeSetPlayerPos(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] == 3)
{
    SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid,197.7956,175.0676,1003.0234);
SendClientMessage(playerid, COLOR_LIGHTRED, "Ne izvrsena zatvorska kazna,vracate se u zatvor.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 4)
{
    SafeSetPlayerInterior(playerid, 0);
SafeSetPlayerPos(playerid,-536.0415,-501.0172,25.5178);
SendClientMessage(playerid, COLOR_LIGHTRED, "Ne izvrsena zatvorska kazna,vracate se u zatvor.");
return 1;
}
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(PlayerInfo[playerid][pAdminDuty] == 1) return 1;
    if(FirstSpawn[playerid] != 1)
    {
        SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50.0);
    SafeSetPlayerInterior(playerid, 3);
        rand = random(sizeof(gMedicSpawns));
SafeSetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 0);
        TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Ti trebas odmor sada ...", 5000, 3);
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        if(PlayerInfo[playerid][pRegularRank] == 1)
        {
        SetTimerEx("ReleaseFromHospital", 20000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 2)
        {
        SetTimerEx("ReleaseFromHospital", 17500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 3)
        {
        SetTimerEx("ReleaseFromHospital", 15000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 1)
        {
        SetTimerEx("ReleaseFromHospital", 12500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 4)
        {
        SetTimerEx("ReleaseFromHospital", 10000, 0, "i", playerid);
}
else
{
    SetTimerEx("ReleaseFromHospital", 25000, 0, "i", playerid);
}
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    return 1;
}
}
if(JustDied[playerid] == 1)
{
    if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
    {
        SetPlayerVirtualWorld(playerid, 0);
        PlayerInfo[playerid][pVirWorld] = 0;
    }
    SafeSetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
    SetPlayerFacingAngle(playerid, 270.0);
    SafeSetPlayerInterior(playerid,0);
    TogglePlayerControllable(playerid, 1);
    return 1;
}
    if(PlayerInfo[playerid][pCrashed] == 1)
{
    if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
    {
        SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
        SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
    SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
    return 1;
}
}
if(house != 999)
{
    if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
SafeSetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
HouseEntered[playerid] = house;
PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
PlayerInfo[playerid][pInt] = 6;
return 1;
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
return 1;
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//SWAT spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    SetPlayerFacingAngle(playerid, 85);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//MD spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SafeSetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 270);
PlayerInfo[playerid][pInt] = 0;
    return 1;
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    PlayerInfo[playerid][pInt] = 5;
    return 1;
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Signatra spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    PlayerInfo[playerid][pInt] = 5;
    return 1;
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
SafeSetPlayerInterior(playerid,3);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 3;
    return 1;
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 270);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
    {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }
    if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) //Auto skola spawn
    {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SafeSetPlayerInterior(playerid,3);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }
    if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //Vatrogasci spawn
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
SetPlayerFacingAngle(playerid, 90);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }
    if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //Sons of Anarchy spawn
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
SetPlayerFacingAngle(playerid, 180);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }
    if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) //BPM spawn
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
SetPlayerFacingAngle(playerid, 180);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Rusian spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    PlayerInfo[playerid][pInt] = 3;
    return 1;
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//Grove Street Spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
}
if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)//Desert spawn
{
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1632.2606,-2330.8588,13.5468);
    PlayerInfo[playerid][pInt] = 5;
    return 1;
}
    if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0) //Spawn za igrace
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 1632.2606,-2330.8588,13.5468);
SetPlayerFacingAngle(playerid, 180);
PlayerInfo[playerid][pInt] = 0;
        return 1;
    }

    if ((gTeam[playerid]) == 1)
    {
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gMedPlayerSpawns));
SafeSetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SafeSetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,1612.3240,-2330.1670,13.5469);
SetPlayerFacingAngle(playerid, 0);
SafeSetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
            }
}
}
return 1;
}


Znaci ceo ovaj public SetPlayerSpawn prekopiraj umesto tvog i radice ti!

Nadjes pod OnPlayerSpawn liniju koja te tamo spawna,i obrises je i tu stavis koordinate koje ti zelis

Kad stavis tvoje koordinate umesto onog da te spawn na mestu gde si bio kad si izasao sa serv, isto te vrati na mestu gde si zadnji put bio... Ne znam zbog cega ali meni se isto desilo, pa sam stavio ovakav setplayerspawn i sda radi super... :)