Hallo,
folgendes Problem -> Skin wechseln geht -> Spieler drückt Spawn -> Server stürzt ab.
Hier mal der Code, finde einfach keinen Fehler.
public OnPlayerRequestClass(playerid, classid)
{
new Skin = GetPlayerSkin(playerid);
if(Skin > 102 && Skin < 104)
{
GameTextForPlayer(playerid, "~p~Ballas", 3000, 3);
}
else if(Skin > 105 && Skin < 107)
{
GameTextForPlayer(playerid, "~g~Grove Street", 3000, 3);
}
else if(Skin > 108 && Skin < 110)
{
GameTextForPlayer(playerid, "~y~Vagos", 3000, 3);
}
else if(Skin > 132 && Skin < 230)
{
GameTextForPlayer(playerid, "~w~Homeless", 3000, 3);
}
else if(Skin > 120 && Skin < 122)
{
GameTextForPlayer(playerid, "~r~Chinese", 3000, 3);
}
else if(Skin > 114 && Skin < 116)
{
GameTextForPlayer(playerid, "~b~~h~~h~~h~Aztecas", 3000, 3);
}
else if(Skin > 281 && Skin < 286)
{
GameTextForPlayer(playerid, "~b~Police", 3000, 3);
}
SetPlayerCameraPos(playerid, 154.174423, -1953.522949, 51.343750);
SetPlayerCameraLookAt(playerid, 154.908477, -1950.423706, 51.343750);
SetPlayerPos(playerid, 154.908477, -1950.423706, 51.343750);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 164.707534);
return 1;
}
public OnPlayerSpawn(playerid)
{
/*
if(gTeam[playerid] == TEAM_ADMIN && (!IsPlayerAdmin(playerid) && !IsPlayerAdmin(playerid) ) )
{
ForceClassSelection(playerid);
return SetPlayerHealth(playerid, 0.0);
}
*/
StopAudioStreamForPlayer(playerid);
GivePlayerWeapon(playerid, 34, 321);
GivePlayerWeapon(playerid, 24, 245);
GivePlayerWeapon(playerid, 31, 254);
GivePlayerWeapon(playerid, 25, 254);
new Skin = GetPlayerSkin(playerid);
if(Skin > 102 && Skin < 104)
{
SetPlayerTeam(playerid, TEAM_BALLAS);
SetPlayerColor(playerid, COL_PURPLE);
}
else if(Skin > 105 && Skin < 107)
{
SetPlayerTeam(playerid, TEAM_GROVE);
SetPlayerColor(playerid, COL_GREEN);
}
else if(Skin > 108 && Skin < 110)
{
SetPlayerTeam(playerid, TEAM_VAGOS);
SetPlayerColor(playerid, COL_YELLOW);
}
else if(Skin > 132 && Skin < 230)
{
SetPlayerTeam(playerid, TEAM_HOMLESS);
SetPlayerColor(playerid, COLOR_WHITE);
}
else if(Skin > 120 && Skin < 122)
{
SetPlayerTeam(playerid, TEAM_CHINESE);
SetPlayerColor(playerid, COLOR_RED);
}
else if(Skin > 114 && Skin < 116)
{
SetPlayerTeam(playerid, TEAM_AZTECAS);
SetPlayerColor(playerid, COL_LIGHTBLUE);
}
else if(Skin > 281 && Skin < 286)
{
SetPlayerTeam(playerid, TEAM_POLICE);
SetPlayerColor(playerid, COL_BLUE);
}
return 1;
}