SetSpawnInfo(playerid,//ide az adatokat ahogy irtam);SpawnPlayer(playerid);
public OnPlayerDeath
SetSpawnInfo( playerid, 0, 299, 1177.4703,-1324.4379,14.0723, 269.15, 0, 0, 0, 0, 0, 0 );SpawnPlayer(playerid);
#include a_samp#include zcmdnew 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;}
OnPlayerDeath(playerid, killerid, reason){SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );}
//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;}
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;}
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;}
OnPlayerDeath(playerid,killerid,reason){ SetSpawnInfo( playerid,//ide pedig az adatokat.)}