hey ich hab mir da grade was gebastelt und ja jetzt hab ich das Problem wen ich spawne und es ist noch kein spawn in der spawns Ordner den spawn ich ihrne wo im Nirgen wo, was muss ich amchen das es nicht so ist
Sprich die neuen am New spawn spawnen ?
public OnPlayerSpawn(playerid)
{
{
SetPlayerPos(playerid,-2581.8469,310.1796,5.1797);
SetPlayerFacingAngle(playerid,86.7459);
}
new pname[MAX_PLAYER_NAME], path[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "spawns/%s.ini", pname);
if(!dini_Exists(path))
{
dini_Create(path);
}
SetPlayerPos(playerid, dini_Float(path, "x"), dini_Float(path, "y"), dini_Float(path, "z"));
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new Float:x, Float:y, Float:z, pname[MAX_PLAYER_NAME], path[128];
GetPlayerPos(playerid, x, y, z);
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "spawns/%s.ini", pname);
if(!dini_Exists(path))
{
dini_Create(path);
}
dini_FloatSet(path, "x", x);
dini_FloatSet(path, "y", y);
dini_FloatSet(path, "z", z);
return 1;
}
lg kifkat
//Rechtschreibung
//Edit
Bitte helft mir