Heyho,
Ich habe versucht eine Skinauswahl zu integrieren.
Allerdings werde ich gekickt, sobald die Auswahl angezeigt wird.
Code:
C
case DIALOG_CHOOSETEAM:
{
if(response) // Polizist
{
TogglePlayerSpectating(playerid,0);
TextDrawHideForPlayer(playerid,LogoWelcome);TextDrawHideForPlayer(playerid,BlockDown);TextDrawHideForPlayer(playerid,BlockUP);TextDrawHideForPlayer(playerid,SideTextTs3);
TextDrawHideForPlayer(playerid,LogoWord);TextDrawHideForPlayer(playerid,LogoServerName);TextDrawHideForPlayer(playerid,LogoUnderline);TextDrawHideForPlayer(playerid,SideTextForum);
Spieler[playerid][pTeam] = 1;
for(new xS=0;xS<MAX_SKIN_DATA;xS++)
{
if(SkinData[xS][skinGender] == Spieler[playerid][pGeschlecht])
{
pChoosedSkin[playerid] = SkinData[xS][skinID];
pChoosedID[playerid] = xS;
SetPlayerSkin(playerid, pChoosedSkin[playerid]);
break;
}
}
pClothesPlace[playerid] = 1;
PlayerTextDrawShow(playerid, pTextSkinChoose[playerid][0]);
PlayerTextDrawShow(playerid, pTextSkinChoose[playerid][1]);
PlayerTextDrawShow(playerid, pTextSkinChoose[playerid][2]);
SelectTextDraw(playerid, 0xA3B4C5FF);
SetPlayerCameraPos(playerid, 198.7011, -134.6350, 1004.7740);
SetPlayerCameraLookAt(playerid, 199.3376,-128.0158,1003.5152);
SetPlayerPos(playerid, 199.3376,-128.0158,1003.5152);
SetPlayerFacingAngle(playerid, 173.5490);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 2000+playerid);
FreezePlayer(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "[Info] "COLOR_HEX_WHITE"Bitte wähle einen Skin aus, indem du auf die Knöpfe drückst.");
SendClientMessage(playerid, COLOR_YELLOW, "[Info] "COLOR_HEX_WHITE"Wenn du fertig bist, klicke auf "COLOR_HEX_YELLOW"Fertig"COLOR_HEX_WHITE".");
return 1;
}
if(!response) // Zivilist
{
TogglePlayerSpectating(playerid,0);
TextDrawHideForPlayer(playerid,LogoWelcome);TextDrawHideForPlayer(playerid,BlockDown);TextDrawHideForPlayer(playerid,BlockUP);TextDrawHideForPlayer(playerid,SideTextTs3);
TextDrawHideForPlayer(playerid,LogoWord);TextDrawHideForPlayer(playerid,LogoServerName);TextDrawHideForPlayer(playerid,LogoUnderline);TextDrawHideForPlayer(playerid,SideTextForum);
Spieler[playerid][pTeam] = 2;
for(new xS=0;xS<MAX_SKIN_DATA;xS++)
{
if(SkinData[xS][skinGender] == Spieler[playerid][pGeschlecht])
{
pChoosedSkin[playerid] = SkinData[xS][skinID];
pChoosedID[playerid] = xS;
SetPlayerSkin(playerid, pChoosedSkin[playerid]);
break;
}
}
pClothesPlace[playerid] = 2;
PlayerTextDrawShow(playerid, pTextSkinChoose[playerid][0]);
PlayerTextDrawShow(playerid, pTextSkinChoose[playerid][1]);
PlayerTextDrawShow(playerid, pTextSkinChoose[playerid][2]);
SelectTextDraw(playerid, 0xA3B4C5FF);
SetPlayerCameraPos(playerid, 198.7011, -134.6350, 1004.7740);
SetPlayerCameraLookAt(playerid, 199.3376,-128.0158,1003.5152);
SetPlayerPos(playerid, 199.3376,-128.0158,1003.5152);
SetPlayerFacingAngle(playerid, 173.5490);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 2000+playerid);
FreezePlayer(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "[Info] "COLOR_HEX_WHITE"Bitte wähle einen Skin aus, indem du auf die Knöpfe drückst.");
SendClientMessage(playerid, COLOR_YELLOW, "[Info] "COLOR_HEX_WHITE"Wenn du fertig bist, klicke auf "COLOR_HEX_YELLOW"Fertig"COLOR_HEX_WHITE".");
return 1;
}
}
Alles anzeigen
Danke schonmal