[Pomoc] Spawn

Započeo Ludak, Jun 03, 2012, 16:49:09 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: NLRP
Opis problema: Ovako imam jedan problem a to je da kada igrac ode relog ili ode sa servera i kad opet udje na server vrati stvori se tamo gde je bio, kako da namestim da se spawn na aerodrom, ili kucu, bazu??
Deo skripte: ako nesto treba ne znam sta da stavim...
Hvala unapred

Pod

public OnPlayerDisconnect

Nadji deo gde cuva koordinate igraca kad napusti server,i onda pod OnPlayerConnect nadji deo gde ucitava te koordinate,jednostavno obrisi ta dva dela i sve VEZANO ZA NJIH
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

ne znam sta da brisem mozes malo objasniti?

Aj daj

public OnPlayerDisconnect
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

.
Poslednja Izmena: Jun 03, 2012, 20:47:58 POSLE PODNE od Ludak

Citat: Ludak poslato Jun 03, 2012, 19:38:31 POSLE PODNE
Evo public OnPlayerDisconnect(playerid, reason)
{
    KillTimer(DragTimer[playerid]);
gActivePlayers[playerid]--;
numplayers--;
    new string[256];
if(reason == 0)
{
     PlayerInfo[playerid][pCrashed] = 1;
    for(new slot = 0; slot != 12; slot++)
    {
        new wep, ammo;
        GetPlayerWeaponData(playerid, slot, wep, ammo);

        if(wep != 0 && ammo != 0)
        {
            if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
            else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
            else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
            else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
        }
    }
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "{C0C0C0}(( %s je napustio server. ))", pname);
    ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
/////////////////////////////////////////////////////////////////////////////////////////////////////////
if(PlayerCuffed[playerid] > 0 || WantedLevel[playerid] > 1)
{
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = 800;
    WantedPoints[playerid] = 0;
WantedLevel[playerid] = 0;
    JBC_SetPlayerPos(playerid, 107.2300,1920.6311,18.5208);
SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
StopAudioStreamForPlayer(playerid);
Delete3DTextLabel(farebText[playerid]);
Delete3DTextLabel(faretText[playerid]);
OnPlayerUpdateCustom(playerid);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
foreach (Player, i)
{
        if(TaxiAccepted[i] < 999)
        {
        if(TaxiAccepted[i] == playerid)
        {
            TaxiAccepted[i] = 999;
            GameTextForPlayer(i, "~w~Pozivaoc taxija~n~~r~je napustio igru!", 4000, 4);
            TaxiCallTime[i] = 0;
            DisablePlayerCheckpoint(i);
        }
        }
        else if(BusAccepted[i] < 999)
        {
        if(BusAccepted[i] == playerid)
        {
            BusAccepted[i] = 999;
            GameTextForPlayer(i, "~w~Pozivaoc busa~n~~r~je napustio igru!", 4000, 4);
            BusCallTime[i] = 0;
            DisablePlayerCheckpoint(i);
        }
        }
}
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (GetPlayerVehicleID(playerid) == 131) SetVehicleToRespawn(131);
OnPlayerUpdateCustom(playerid);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
    if(IsPlayerConnected(TransportDriver[playerid]))
{
    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
    TransportTime[TransportDriver[playerid]] = 0;
    TransportCost[TransportDriver[playerid]] = 0;
    format(string, sizeof(string), "~w~Putnik je izasao~n~~g~Zarada $%d",TransportCost[playerid]);
    GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(HireCar[playerid] != 9999)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
if(reason != 0)
{
SetVehicleToRespawn(HireCar[playerid]);
}
}
if(GangCar[playerid] != 512)
{
gLastDriver[GangCar[playerid]] = 520;
gCarLock[GangCar[playerid]] = 0;
UnLockCar(GangCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
gLastDriver[gLastCar[playerid]] = 300;
if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
{
gCarLock[gLastCar[playerid]] = 0;
UnLockCar(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
    if(Boxer1 == playerid)
    {
        if(IsPlayerConnected(Boxer2))
        {
        PlayerBoxing[Boxer2] = 0;
        JBC_SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
        SetPlayerInterior(Boxer2, 5);
        PlayerInfo[Boxer2][pInt] = 5;
        GameTextForPlayer(Boxer2, "~r~Mech je prekinut", 4000, 4);
}
    }
    else if(Boxer2 == playerid)
    {
        if(IsPlayerConnected(Boxer1))
        {
        PlayerBoxing[Boxer1] = 0;
        JBC_SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
        SetPlayerInterior(Boxer1, 5);
        PlayerInfo[Boxer2][pInt] = 5;
        GameTextForPlayer(Boxer1, "~r~Mech je prekinut", 4000, 4);
}
    }
    InRing = 0;
      RoundStarted = 0;
Boxer1 = 255;
Boxer2 = 255;
TBoxer = 255;
}
    if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
    else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 11)
{
    if(JobDuty[playerid] == 1) { Medics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 7)
{
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 17)
{
if(JobDuty[playerid] == 1) { PizzaBoys -= 1; }
}
    BusrouteEast[playerid][0] = 0;
BusrouteWest[playerid][0] = 0;
    }


Jel ovo ceo public ??

Ako nemoze da stane stavi ga na www.pastebin.com i posalji link ovde .
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

Jel ovo?  :)  http://pastebin.com/utwu
Poslednja Izmena: Jun 03, 2012, 20:16:22 POSLE PODNE od Ludak

Posalji mi public OnPlayerLogin isto na Paste Bin !!
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

Poslednja Izmena: Jun 03, 2012, 19:55:12 POSLE PODNE od Ludak

Citat: Ludak poslato Jun 03, 2012, 19:53:11 POSLE PODNE
http://pastebin.com/5Qdp6zzb evo

Ovaj deo :

SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);

Zameni sa :

SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel],1520.3196,-1651.6309,13.5392, 1.0, -1, -1, -1, -1, -1, -1);

To je negde oko PD-a !!

Ti sebi izmeni koordinate !!
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

Nisi me razumeo mislio sam kad udje igrac da se spawn-a u kuci ili u bazi..al u svakom slucaju hvala ti. :)