[POMOC] Smrt, spawn

Započeo 032.Marcus
7. Mar. 2015. Zaključano
414
pregleda
7
postova
032.Marcus
4
Made Man
7. Mar. 2015.
Scripta koju koristim: moja od nule
Detaljan opis problema: zanima me kako da namestim da se igrac spawnuje ispred bolnice nakon smrti. Probao sam na nekoliko nacina, i ni 1 ne radi ispravno. Ako mozete dajte mi neki od vasih nacina ili jednostavno recite kako da napravim
Code: /
[WW]ivan
5
Kingpin
7. Mar. 2015.
napravis varijablu neku, i kad umer postavis je na 1, pod onplayerspawn napravis provjeru ako je umro da ga stavi na te kordinate
032.Marcus
4
Made Man
7. Mar. 2015.
Vec mi je tako stavljeno, i nece...
Stavlja me nakon smrti na koordinate koje su postavljene u AddPlayerClass
arnel avdic
5
Underboss
7. Mar. 2015.
onplayerdeath callback , tu stavljaÅ¡ , kad igrac  umre setplayerpos itd. zavisi sta zelis
James_SmithXDl
6
OG Legend
7. Mar. 2015.
arnel avdic wrote on March 7, 2015, 4:34 pm:
onplayerdeath callback , tu stavljaÅ¡ , kad igrac  umre setplayerpos itd. zavisi sta zelis

Ne.OnPlayerDeath je pozvan kad igrač umre i to neće imati efekta.Pod OnPlayerSpawn treba da proveri da li je umro tako što će pod death postaviti vrednost neke varijable na 1 ili šta već te kad proveri tu vrednost lepo da response pod OnPlayerSpawn.
032.Marcus
4
Made Man
7. Mar. 2015.
Probao sam sve, i nece...
Probao sam da pod OnPlayerSpawn stavim SetPlayerSpawn, ali nece ni tako...

SetPlayerSpawn (sad je iskljucen)
Quote
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
DisablePlayerCheckpoint(playerid);

pBelt = 9999;
    pHelmet = 9999;
    pRefuelling = 9999;
    RefillLitre = 0;
    vSearching = 9999;
    pSearching = 9999;
    OnATruckMission = 9999;
    TaxiDuty = 9999;
    TaxiDriver = 9999;
    TaxiStartingPrice = 0;
    TaxiTime = 0;
    TaxiMoney = 0;
    MechanicDuty = 9999;
    MechanicRepairOffer = 9999;
MechanicRepairPlayerOffer = 9999;
MechanicRepairOfferPrice = 0;
MechanicRepairOfferVehicle = 9999;
MechanicRefillOffer = 9999;
MechanicRefillPlayerOffer = 9999;
MechanicRefillLitre = 0;
MechanicRefillOfferPrice = 0;
MechanicRefillOfferVehicle = 9999;
InBank = 9999;
InCityHall = 9999;
InGSFHQ = 9999;
InBallasHQ = 9999;
InLSVHQ = 9999;
InVLAHQ = 9999;
InHouse = 9999;
InApartment = 9999;
InBusiness = 9999;
iCall = 9999;
Caller = 9999;
CalledPlayer = 9999;
InCall = 9999;
IsPlayerDead = 1;
PlayerOnTutorial = 9999;
VehicleSellOffer = 9999;
VehicleBuyOffer = 9999;
VehicleForOffer = 9999;
VehiclePlayerOffer = 9999;
VehicleOfferPrice = 0;
HouseSellOffer = 9999;
HouseBuyOffer = 9999;
HouseForOffer = 9999;
HousePlayerOffer = 9999;
HouseOfferPrice = 0;
DrugSellOffer = 9999;
DrugBuyOffer = 9999;
DrugPlayerOffer = 9999;
DrugOfferAmmount = 0;
DrugOfferPrice = 0;
MaterialsSellOffer = 9999;
MaterialsBuyOffer = 9999;
MaterialsPlayerOffer = 9999;
MaterialsOfferAmmount = 0;
MaterialsOfferPrice = 0;

Tazzed = 9999;
Cuffed = 9999;
GaveUp = 9999;
Pulling = 9999;
Pulled = 9999;

if(Pulling != 9999)
{
KillTimer(CopTimer);
Pulled[Pulling] = 9999;
Pulling = 9999;
}

if(Pulled != 9999)
{
    KillTimer(CopTimer[Pulled]);
    Pulling[Pulled] = 9999;
    Pulled = 9999;
}

TextDrawDestroy(BankMoney);
return 1;
}


OnPlayerSpawn
Quote
public OnPlayerSpawn(playerid)
{
    SetCameraBehindPlayer(playerid);
   
    TextDrawShowForPlayer(playerid, DateTD);
TextDrawShowForPlayer(playerid, TimeTD);
    TextDrawShowForPlayer(playerid, ServerTD);
    TextDrawShowForPlayer(playerid, BoxTD);
    TextDrawShowForPlayer(playerid, RandomMessagesTD);
    TextDrawShowForPlayer(playerid, BankMoney);
   
    if(PlayerInfo != 9999 && (PlayerInfo != 1 || PlayerInfo != 2)) return SetPlayerSkin(playerid, PlayerInfo);
    else SetPlayerSkin(playerid, PlayerInfo);
   
    if(PlayerInfo == 9999)
    {
        SCM(playerid, BOJA_PLAVA, "Niste jos odradili tutorial.");
        SCM(playerid, BOJA_PLAVA, "Odradite tutorial, i po zavrsetku tutoriala dobicete 500$");
}

//SetPlayerSpawn(playerid);

if(IsPlayerDead == 1)
{
    SetPlayerPos(playerid, 1178.3140, -1325.6981, 14.1139);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
IsPlayerDead = 0;
}

SetPlayerSkills(playerid);
return 1;
}
PedjaZakon
5
Godfather
7. Mar. 2015.
Udjes na server ubijes se onda sacuva poziciju i onda u skripti pronadjes i onda je promenis gde hoces da se igrac spawna posle ubistva a za login posebno

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha