Frage zu OnPlayerRequestClass(playerid, classid)

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Jo ich habe da mal eine Frage zum public OnPlayerRequestClass(playerid, classid).
    Ich habe vorhin die Skinauswahl klappt auch ohne Probleme, jedoch bekommt der Spieler wenn er zu weit nach rechts klickt den CJ Skin..
    Kann man dies irgendie stopen: sprich das er dann nicht weiter nach rechts gehen kann?
    Habe es zuzeit so das ich einfach die Skins weiter geswitch haben.
    Ist mir aber zu dumm:P.



    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,2080.0596,1908.7006,14.3902);
    SetPlayerFacingAngle(playerid,188.9284);
    SetPlayerCameraPos(playerid,2080.0596,1905.7003,14.3902);
    SetPlayerCameraLookAt(playerid,2080.0596,1908.7006,14.3902);
    switch (classid)
    {
    case 0://Ballas
    {
    GameTextForPlayer(playerid,"~p~Ballas",300,3);
    SetPlayerTeam(playerid,TEAM_BALLAS);
    SetPlayerSkin(playerid,1);
    }
    case 1://Aztecas
    {
    GameTextForPlayer(playerid,"~b~Aztecas",300,3);
    SetPlayerTeam(playerid,TEAM_AZTECAS);
    SetPlayerSkin(playerid,2);
    }
    case 2://GroveStreet
    {
    GameTextForPlayer(playerid,"~g~Grove Street",300,3);
    SetPlayerTeam(playerid,TEAM_GROVESTREET);
    SetPlayerSkin(playerid,3);
    }
    case 3://Rifa
    {
    GameTextForPlayer(playerid,"~b~SanFierro Rifa",300,3);
    SetPlayerTeam(playerid,TEAM_SANFIERRORIFA);
    SetPlayerSkin(playerid,4);
    }
    case 4://LaCosaNostra
    {
    GameTextForPlayer(playerid,"~bl~La Cosa Nostra",300,3);
    SetPlayerTeam(playerid,TEAM_LACOSANOSTRA);
    SetPlayerSkin(playerid,5);
    }
    case 5://Red Soldier
    {
    GameTextForPlayer(playerid,"~p~Red Soldier",300,3);
    SetPlayerTeam(playerid,TEAM_REDSOLDIER);
    SetPlayerSkin(playerid,6);
    }
    case 6://Triaden
    {
    GameTextForPlayer(playerid,"~p~Triaden",300,3);
    SetPlayerTeam(playerid,TEAM_TRIADEN);
    SetPlayerSkin(playerid,7);
    }
    case 7://Ägyptische Mafia
    {
    GameTextForPlayer(playerid,"~p~Ägyptische Mafia",300,3);
    SetPlayerTeam(playerid,TEAM_AEGYPTISCHEMAFIA);
    SetPlayerSkin(playerid,8);
    }
    //Hier wiederholen Sie sich wieder..
    case 8://Ballas
    {
    GameTextForPlayer(playerid,"~p~Ballas",300,3);
    SetPlayerTeam(playerid,TEAM_BALLAS);
    SetPlayerSkin(playerid,1);
    }
    case 9://Aztecas
    {
    GameTextForPlayer(playerid,"~b~Aztecas",300,3);
    SetPlayerTeam(playerid,TEAM_AZTECAS);
    SetPlayerSkin(playerid,2);
    }
    case 10://GroveStreet
    {
    GameTextForPlayer(playerid,"~g~Grove Street",300,3);
    SetPlayerTeam(playerid,TEAM_GROVESTREET);
    SetPlayerSkin(playerid,3);
    }
    case 11://Rifa
    {
    GameTextForPlayer(playerid,"~b~SanFierro Rifa",300,3);
    SetPlayerTeam(playerid,TEAM_SANFIERRORIFA);
    SetPlayerSkin(playerid,4);
    }
    case 12://LaCosaNostra
    {
    GameTextForPlayer(playerid,"~bl~La Cosa Nostra",300,3);
    SetPlayerTeam(playerid,TEAM_LACOSANOSTRA);
    SetPlayerSkin(playerid,5);
    }
    case 13://Red Soldier
    {
    GameTextForPlayer(playerid,"~p~Red Soldier",300,3);
    SetPlayerTeam(playerid,TEAM_REDSOLDIER);
    SetPlayerSkin(playerid,6);
    }
    case 14://Triaden
    {
    GameTextForPlayer(playerid,"~p~Triaden",300,3);
    SetPlayerTeam(playerid,TEAM_TRIADEN);
    SetPlayerSkin(playerid,7);
    }
    case 15://Ägyptische Mafia
    {
    GameTextForPlayer(playerid,"~p~Ägyptische Mafia",300,3);
    SetPlayerTeam(playerid,TEAM_AEGYPTISCHEMAFIA);
    SetPlayerSkin(playerid,8);
    }
    }
    return 1;
    }