10.09.2013, 12:50
(
Последний раз редактировалось DaniceMcHarley; 01.06.2017 в 02:38.
)
------
enum PlayerInfo
{
//playerinfo stuff
Float:CurX,
Float:CurY,
Float:CurZ,
//blabla
}
OnPlayerDeath(..
{
GetPlayerPos((playerid), PInfo[id][CurX], PInfo[id][CurY], PInfo[id][CurZ]);
return 1;
}
//Then
OnPlayerSpawn(...
{
SetPlayerPos(id, PInfo[id][CurX], PInfo[id][CurY], PInfo[id][CurZ]);
return 1;
}
public OnPlayerSpawn(playerid) { new Float:slx, Float:sly, Float:slz; GetPlayerPos(killerid, slx, sly, slz); SetPlayerPos(playerid, slx, sly, slz); return 1; }
OnPlayerDeath(..
{
GetPlayerPos((playerid), PInfo[playerid][CurX], PInfo[playerid][CurY], PInfo[playerid][CurZ]);
return 1;
}
//Then
OnPlayerSpawn(...
{
SetPlayerPos(playerid, PInfo[playerid][CurX], PInfo[playerid][CurY], PInfo[playerid][CurZ]);
return 1;
}
enum PlayerInfo
{
//playerinfo stuff
Float:CurX,
Float:CurY,
Float:CurZ,
//blabla
}
new bool:pKilled[MAX_PLAYERS];
OnPlayerConnect(..
{
pKilled[playerid] = false;
return 1;
}
OnPlayerDeath(..
{
GetPlayerPos(playerid, PInfo[playerid][CurX], PInfo[playerid][CurY], PInfo[playerid][CurZ]);
pKilled[playerid] = true;
return 1;
}
//Then
OnPlayerSpawn(...
{
if(pKilled[playerid] == true)
{
SetPlayerPos(playerid, PInfo[playerid][CurX], PInfo[playerid][CurY], PInfo[playerid][CurZ]);
pKilled[playerid] = false;
}
return 1;