Hallo,
ich habe ein selbstgemachtest skinauswahl dings. Aber wenn ich auf weiter oder zurueck klicke ändert sich nicht der skin:
public OnPlayerClickTextDraw(playerid,Text:clickedid)
{
if(clickedid == SkinAuswahl[0]) //ZURUECK
{
if(sInfo[playerid][AmUmkleiden]==1)
{
if(GetPlayerVirtualWorld(playerid) != 0)
{
sInfo[playerid][Skin]--;
if(sInfo[playerid][Skin] < 0) sInfo[playerid][Skin] = sizeof(BincoSkins);
SetPlayerSkin(playerid,BincoSkins);
}
}
}
if(clickedid == SkinAuswahl[2]) //WEITER
{
if(sInfo[playerid][AmUmkleiden]==1)
{
if(GetPlayerVirtualWorld(playerid) != 0)
{
sInfo[playerid][Skin]--;
if(sInfo[playerid][Skin] > 0) sInfo[playerid][Skin] = sizeof(BincoSkins);
SetPlayerSkin(playerid,BincoSkins);/*[sInfo[playerid][Skin]][Skinid]*/
}
}
}
return 1;
}
new BincoSkins[][Binco_daten] =//{Skinid,SkinPreis}
{
{1,20},{2,20}
};
der befehl: ocmd:umkleiden(playerid,params[])
{
if(sInfo[playerid][eingelogt]==0)return SendClientMessage(playerid,COLOR_RED,"Du bist nicht eingeloggt!");
{
if(IsPlayerInRangeOfPoint(playerid,10.0,207.737991,-109.019996,1005.132812))
{
SetPlayerPos(playerid,217.5389,-98.0512,1005.2578);
SetPlayerCameraPos(playerid, 217.1823, -101.6069, 1005.3817);
SetPlayerCameraLookAt(playerid, 217.2095, -100.6087, 1005.3627);
TextDrawShowForPlayer(playerid,SkinAuswahl[0]);
SelectTextDraw(playerid, 0xFFFFFFFF);
TextDrawShowForPlayer(playerid,SkinAuswahl[1]);
SelectTextDraw(playerid, 0xFFFFFFFF);
TextDrawShowForPlayer(playerid,SkinAuswahl[2]);
SelectTextDraw(playerid, 0xFFFFFFFF);
TogglePlayerControllable(playerid,1);
}
}
return 1;
}