Jump to content
  • 0

pomoc Pozice


arci224

Dotaz

Takže mam prez Y_INI ukládaní to funguje, i ukládaní pozice. ale po smrti mě to načte tam kde mam souřadnice v souboru, můžete my poradit aby to spawnovalo tam kde ma ?. po smrti na : 1244.711059, 332.975585, 19.554687

 

Code SPAWNU 

public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pSkin]==0)
	{
	SetPlayerSkin(playerid, 250);
	}
   	else {
 	SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
 	}
	if(PlayerInfo[playerid][pLastX] == 0.0 && PlayerInfo[playerid][pLastY] == 0.0)
	{
	SetPlayerPos(playerid, 1244.711059, 332.975585, 19.554687);
	}
	else SetPlayerPos(playerid, PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ]);
	SetPlayerInterior(playerid, 0);
	TogglePlayerControllable(playerid,1);
	SetPlayerColor(playerid, COLOR_GRAY);
 	return 1;
}

// DEATH:
public OnPlayerDeath(playerid, killerid, reason)
{
	PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
	return 1;
}

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pSkin]==0)
	{
	SetPlayerSkin(playerid, 250);
	}
   	else {
 	SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
 	}
	if(PlayerInfo[playerid][pLastX] == 0.0 && PlayerInfo[playerid][pLastY] == 0.0 || GetPVarInt(playerid, "chcipnul") == 1 )
	{
	SetPlayerPos(playerid, 1244.711059, 332.975585, 19.554687);
        SetPVarInt(playerid, "chcipnul", 0);
	}
	else SetPlayerPos(playerid, PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ]);
	SetPlayerInterior(playerid, 0);
	TogglePlayerControllable(playerid,1);
	SetPlayerColor(playerid, COLOR_GRAY);
 	return 1;
}

// DEATH:
public OnPlayerDeath(playerid, killerid, reason)
{
	PlayerInfo[killerid][pKills]++;
        PlayerInfo[playerid][pDeaths]++;
        SetPVarInt(playerid, "chcipnul", 1);
	return 1;
}

mas kliku ze mam dobrou naladu a cas :d takze mas rovnou code ;)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...