public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid,"Knastzeit")>0)
{
SetPlayerInterior(playerid,6);
SpawnInfo(playerid);
ErsterSpawn[playerid]=1;
SetPVarInt(playerid,"Firstconnect",0);
return 1;
}
if(ErsterSpawn[playerid] == 0)//Falls der Spieler noch nicht seinen ersten Spawn hatte => Kein Krankenhaus...
{
//Falls ja...
ErsterSpawn[playerid]=1;//Setzt die Spieler Variable auf 1 => Erster Spawn gehabt
SpawnInfo(playerid);
SetPVarInt(playerid,"Firstconnect",0);
return 1;
}
return 1;
}
und hier mein stock SpawnInfo
stock SpawnInfo(playerid)
{
new Spieler[512];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
if(GetPVarInt(playerid,"Knastlevel")>5)
{
SetTimerEx("KnastTimer6WP",1800000,0,"i",playerid);
SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid, knast);
}
else if(GetPVarInt(playerid,"Knastlevel")==5)
{
SetTimerEx("KnastTimer5WP",1500000,0,"i",playerid);
SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid, knast);
}
else if(GetPVarInt(playerid,"Knastlevel")==4)
{
SetTimerEx("KnastTimer4WP",1200000,0,"i",playerid);
SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid, knast);
}
else if(GetPVarInt(playerid,"Knastlevel")==3)
{
SetTimerEx("KnastTimer3WP",900000,0,"i",playerid);
SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid, knast);
}
else if(GetPVarInt(playerid,"Knastlevel")==2)
{
SetTimerEx("KnastTimer2WP",600000,0,"i",playerid);
SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid, knast);
}
else if(GetPVarInt(playerid,"Knastlevel")==1)
{
SetTimerEx("KnastTimer1WP",300000,0,"i",playerid);
SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid, knast);
}
else if(GetPVarInt(playerid,"Knastlevel")==0)
{
if(GetPVarInt(playerid,"Fraktion")==1) //PD
{
SetPlayerColor(playerid, pd);
if(GetPVarInt(playerid,"Fraktionsrang")==0)
{
SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==1)
{
SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705,0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==2)
{
SetSpawnInfo(playerid, 0, 280, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==3)
{
SetSpawnInfo(playerid, 0, 281, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==4)
{
SetSpawnInfo(playerid, 0, 283, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==5)
{
SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==6)
{
SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
else if(GetPVarInt(playerid,"Fraktion")==2)//Terror
{
SetPlayerColor(playerid, normal);
if(GetPVarInt(playerid,"Fraktionsrang")==0)
{
SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890,0,0,0,0,0,0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==1)
{
SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==2)
{
SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==3)
{
SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==4)
{
SetSpawnInfo(playerid, 0, 220, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==5)
{
SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==6)
{
SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
else if(GetPVarInt(playerid,"Fraktion")==3) //Army
{
SetPlayerColor(playerid,army);
if(GetPVarInt(playerid,"Fraktionsrang")==0)
{
SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==1)
{
SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==2)
{
SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==3)
{
SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==3)
{
SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==5)
{
SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(GetPVarInt(playerid,"Fraktionsrang")==6)
{
SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
else
{
new skinid;
skinid = SetPVarInt(playerid,"Skin",skinid);
SetSpawnInfo(playerid,skinid,0,1214.4077,-1813.4712,16.5938,273.2053,0,0,0,0,0,0); //zivi spawn
SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
SpawnPlayer(playerid);
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerColor(playerid, normal);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
return 1;
}