Guten Abend,
Ich habe folgendes Problem :
Ich habe in meinem Selfmade bei OnPlayerSpawn die verschiedenen Spawns erstellt nun wollte ich über OnPlayerRequestClass den Spawn Button entfernen und die Spawns automatisch auslesen lassen was nicht funktionierte.
public OnPlayerRequestClass(playerid, classid)
{
SetSpawnInfo(playerid,0,1,GetPVarInt(playerid,"Spawn"),0,0,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid,"Spawn")==1)
{
switch(GetPVarInt(playerid,"Fraktion"))
{
case 1:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Weiß);}
case 2:{SetPlayerPos(playerid,lspdspawn);SetPlayerColor(playerid,Hellblau);}
case 3:{SetPlayerPos(playerid,fbispawn);SetPlayerColor(playerid,Dunkelblau);}
case 4:{SetPlayerPos(playerid,bikerboyzspawn);SetPlayerColor(playerid,Braun);}
case 5:{SetPlayerPos(playerid,medicspawn);SetPlayerColor(playerid,Orange);}
case 6:{SetPlayerPos(playerid,groovestreetspawn);SetPlayerColor(playerid,Dunkelgrün);}
}
return 1;
}
else if(GetPVarInt(playerid,"Spawn")==0)
{
switch(GetPVarInt(playerid,"Fraktion"))
{
case 1:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Weiß);}
case 2:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Hellblau);}
case 3:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Dunkelblau);}
case 4:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Braun);}
case 5:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Orange);}
case 6:{SetPlayerPos(playerid,zivispawn);SetPlayerColor(playerid,Dunkelgrün);}
}
return 1;
}
else if(GetPVarInt(playerid,"Spawn")==2)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof name);
for(new haus=1;haus<MAX_HAUS;haus++)
{
if(strcmp(HausInfo[haus][haus_besitzer],name,false) == 0)
{
new innenraum = HausInfo[haus][haus_innenraum];
SetPlayerPos(playerid,HausInnenraum[innenraum][innen_x],HausInnenraum[innenraum][innen_y],HausInnenraum[innenraum][innen_z]);
SetPlayerInterior(playerid,HausInnenraum[innenraum ][innen_interior]);
inHaus[playerid] = haus;
}
return 1;
}
}
return 1;
}