Szerző Téma: Halál utáni spawn  (Megtekintve 2657 alkalommal)

Halál utáni spawn
« Válasz #15 Dátum: 2014. Március 30. - 10:46:05 »
0
Nah akkor viszont ez fog neked kelleni:
 

SetSpawnInfo(playerid,//ide az adatokat ahogy irtam);
SpawnPlayer(playerid);

 
Hogyha ez sem jo akkor nincs otletem.:/

Halál utáni spawn
« Válasz #16 Dátum: 2014. Március 30. - 18:46:00 »
0
akkor ugy kell: SetPlayerSpawnInfo(...);
vagy ha nem akk nagyon félrefogalmaztál. vagy mi nem értsük?  :question:

Dupla hozzászólás automatikusan összefûzve. ( 2014. Március 30. - 18:47:29 )

*értjük

Halál utáni spawn
« Válasz #17 Dátum: 2014. Március 30. - 18:47:32 »
0
Nem értelmezted félre, de ennél a SetSpawninfos dolognál pl. A legtöbbször oda dob ahová kell, de van hogy grove közepére stb..

Halál utáni spawn
« Válasz #18 Dátum: 2014. Március 24. - 20:14:22 »
0
Nah, sziasztok. Egy apró, azonban kellemetlen hibával találkoztam.. Az lenne a gond, hogy be van állítva, hogyha a játékos meghal hová spawnoljon, igen ám, de ha nem más öli meg(hanem pl felrobban egy kocsival), akkor bedobja a skin választóba.. Oka? Ötlet? Help? :D

Halál utáni spawn
« Válasz #19 Dátum: 2014. Március 24. - 20:26:29 »
0
public OnPlayerDeath

 alatt prbáltad ?

Halál utáni spawn
« Válasz #20 Dátum: 2014. Március 24. - 20:52:00 »
0
Igen.

Dupla hozzászólás automatikusan összefûzve. ( 2014. Március 24. - 20:53:34 )

SetSpawnInfo( playerid, 0, 299, 1177.4703,-1324.4379,14.0723, 269.15, 0, 0, 0, 0, 0, 0 );
SpawnPlayer(playerid);

 
Ez van az OnPlayerDeath alatt.
« Utoljára szerkesztve: 2014. Március 24. - 20:53:34 írta ppatrik2012 »

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Halál utáni spawn
« Válasz #21 Dátum: 2014. Március 25. - 07:00:16 »
0
Írtam neked egy konkrét scriptet. :)
 
#include a_samp
#include zcmd
new Float:dspawn[MAX_PLAYERS][4];
CMD:deathspawn(playerid) {
SetPVarInt(playerid, \"dSpawn\", !GetPVarInt(playerid, \"dSpawn\"));
new str[128];
format(str, sizeof(str), \"Halál utána spawn %skapcsolva!\", GetPVarInt(playerid, \"dSpawn\")?(\"be\"):(\"ki\"));
SendClientMessage(playerid, -1, str);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
if(GetPVarInt(playerid, \"dSpawn\")) {
GetPlayerPos(playerid, dspawn[playerid][0], dspawn[playerid][1], dspawn[playerid][2]);
GetPlayerFacingAngle(playerid, dspawn[playerid][3]);
}
return 1;
}
public OnPlayerSpawn(playerid) {
if(GetPVarInt(playerid, \"dSpawn\")) {
SetPlayerPos(playerid, dspawn[playerid][0], dspawn[playerid][1], dspawn[playerid][2]);
SetPlayerFacingAngle(playerid, dspawn[playerid][3]);
}else{
// Ide azt/azokat a spawnhelye(ke)t amiket akkor szeretnél alkamlmazi ha a deathspawn nincs bekapcsolva
}
return 1;
}

Halál utáni spawn
« Válasz #22 Dátum: 2014. Március 25. - 16:14:56 »
0
Ez oké meg minden, de ez már egy pici túl bonyolítás. Nekem csak annyi kellene, hogy mindig ott teremjen.

Nem elérhető KovaNovik

  • 1121
  • KovaNovik
    • Profil megtekintése
Halál utáni spawn
« Válasz #23 Dátum: 2014. Március 25. - 21:57:26 »
0

OnPlayerDeath(playerid, killerid, reason)
{
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
}

 
Egyszerût kértél. OnPlayerDeathnál ne használj SpawnPlayert, mert akkor elkezd villogni, és kifagysz.
Ennek mennie kell. De ha nem:
 

//Mod tetejére:
new bool:MostHaltMeg[MAX_PLAYERS];
//Megfelelõ helyekre:
OnPlayerSpawn(playerid)
{
if(MostHaltMeg[playerid])
{
SetPlayerPos(playerid, 1.1, 1.1, 1.1);
//Azt csinálsz, amit akarsz.
}
MostHaltMeg[playerid] = false;
}
OnPlayerDeath(playerid, killerid, reason)
{
MostHaltMeg[playerid] = true;
}
« Utoljára szerkesztve: 2014. Március 25. - 22:04:51 írta KovaNovik »

Halál utáni spawn
« Válasz #24 Dátum: 2014. Március 28. - 14:12:22 »
0
Õszinte leszek, próbálkoztam, de nem voltak fenn haverok(teszterek :D) meg én sem nagyon, így nem tudom sikerült-e. De nem zárok, csak ha tudom a tutit.

Nem elérhető Dfoglalo

  • 4069
  • Globális Moderátor
    • Profil megtekintése
Halál utáni spawn
« Válasz #25 Dátum: 2014. Március 28. - 14:37:47 »
0
Öld meg magadat, hogy kiderítsd. 0 HP, vagy leugrás, ütközés, stb.

Halál utáni spawn
« Válasz #26 Dátum: 2014. Március 28. - 15:49:40 »
0
De ez a durva, hogy általában nem nálam jelentkezik a hiba(számomra érthetetlen). Este valszeg tesztelünk haverokkal..

Dupla hozzászólás automatikusan összefûzve. ( 2014. Március 28. - 19:37:24 )

Idézetet írta: KovaNovik date=1395781046\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"47349\" data-ipsquote-contentclass=\"forums_Topic


OnPlayerDeath(playerid, killerid, reason)
{
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
}

 
Egyszerût kértél. OnPlayerDeathnál ne használj SpawnPlayert, mert akkor elkezd villogni, és kifagysz.
Ennek mennie kell. De ha nem:
 

//Mod tetejére:
new bool:MostHaltMeg[MAX_PLAYERS];
//Megfelelõ helyekre:
OnPlayerSpawn(playerid)
{
if(MostHaltMeg[playerid])
{
SetPlayerPos(playerid, 1.1, 1.1, 1.1);
//Azt csinálsz, amit akarsz.
}
MostHaltMeg[playerid] = false;
}
OnPlayerDeath(playerid, killerid, reason)
{
MostHaltMeg[playerid] = true;
}

 

Egyik sem mûködik..
« Utoljára szerkesztve: 2014. Március 28. - 19:37:24 írta ppatrik2012 »

Halál utáni spawn
« Válasz #27 Dátum: 2014. Március 29. - 13:54:06 »
0
enum pInfo
{
SpawnID,
Float:DeathPosX,
Float:DeathPosY,
Float:DeathPosZ,
        bool:OneDeathed
};
new Info[MAX_PLAYERS][pInfo];
public OnPlayerSpawn(playerid)
{
      if(Info[playerid][spawnID]==4)
{
if(Info[playerid][OneDeathed]==true)
{
   SetPlayerPos(playerid,Info[playerid][DeathPosX],Info[playerid][DeathPosY],Info[playerid][DeathPosZ]+2);
   SendClientMessage(playerid,-1,\"{483D8B}[spawn]: {6A5ACD}Lespawnoltál: {87CEEB}Halál utáni{6A5ACD}.\");
       }
       else SetPlayerPos(playerid,0,0,0);
    }
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(Info[playerid][spawnID]==4)
{
    Info[playerid][OneDeathed] = true;
GetPlayerPos(playerid,Info[playerid][DeathPosX],Info[playerid][DeathPosY],Info[playerid][DeathPosZ]);
    }
    return 1;
}
public OnPlayerConnect(playerid)
{
        Info[playerid][spawnID] = 0;
        Info[playerid][DeathPosX] = 0.0;
        Info[playerid][DeathPosY] = 0.0;
        Info[playerid][DeathPosZ] = 0.0;
Info[playerid][OneDeathed] = false;
  return 1;
}
public OnPlayerDisconnect(playerid)
{
       Info[playerid][spawnID] = 0;
        Info[playerid][DeathPosX] = 0.0;
        Info[playerid][DeathPosY] = 0.0;
        Info[playerid][DeathPosZ] = 0.0;
Info[playerid][OneDeathed] = false;
  return 1;
}
CMD:spawndeath(playerid,params[])
{
Info[playerid][spawnID] = 4;
SendClientMessage(playerid,-1,\"{483D8B}[spawn]: {2E8B57}Spawn beállítva: halál után!\");
return 1;
}

 
Modomból szedtem ki. Ha kimaradt vmi irjatok. Kicsit átírtam, mert nem akartam itt dini-sen(ha vki majd kéri megirom, :) )
« Utoljára szerkesztve: 2014. Március 29. - 14:02:25 írta scripter »

Halál utáni spawn
« Válasz #28 Dátum: 2014. Március 29. - 17:19:04 »
0
Nekem csak szimplán annyi kellene, hogy le spawnoljon egy adott skinbe egy adott pozícióra halál után. De eddig mindig vagy grove közepén kötött ki a személy, vagy a skin választóba..

Halál utáni spawn
« Válasz #29 Dátum: 2014. Március 29. - 18:11:44 »
0
Szia.
 
OnPlayerDeath(playerid,killerid,reason)
{
     SetSpawnInfo( playerid,//ide pedig az adatokat.)
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal