Hei,
wenn ich nachm einloggen spawne dann wird der CJ skin gegeben und wenn ich sterbe dann lande ich mitten in soner kleinstadt und nicht am eigentlichen spawn.
OnPlayerDeath
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
PlayerInfo[killerid][pKills]++;
}
PlayerInfo[playerid][pDeaths]++;
SetPVarInt(playerid,"Gestorben",1);
return 1;
}
OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid,"Gestorben")==1)
{
SetPVarInt(playerid,"Gestorben",0);
SetPlayerPos(playerid, 1991.1433, 1240.2410, 10.8203);
SetPlayerFacingAngle(playerid, 322.2074);
SetCameraBehindPlayer(playerid);
setPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerToSpawn(playerid);
}
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Zivi_Winkler", true))
{
SetPlayerSkin(playerid,60);
return 1;
}
return 1;
}
return 1;
}
SetPlayerToSpawn
stock SetPlayerToSpawn(playerid)
{
new derskin;
derskin = PlayerInfo[playerid][pSkin];
SetSpawnInfo(playerid, 0, derskin, 1991.1433, 1240.2410, 10.8203, 322.2074, 0, 0, 0, 0, 0, 0);
SetPlayerPos(playerid, 1991.1433, 1240.2410, 10.8203);
SetPlayerFacingAngle(playerid, 322.2074);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
SpawnPlayer(playerid);
setPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
return 1;
}