Who "Showst" du denn das Skin Textdraw?
Hat ja alles funktioniert, solange ich mein Register System nicht mit anklickbaren Textdraws gemacht habe,.
Code
if (strcmp("/outfit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,1,1295.4492,-1873.7307,13.5956))
{
new stringo[190];
GetPlayerPos(playerid,XANTES[playerid],YANTES[playerid],ZANTES[playerid]);
GetPlayerFacingAngle(playerid,AANTES[playerid]);
VirtualWAN[playerid] = GetPlayerVirtualWorld(playerid);
InteriorAN[playerid] = GetPlayerInterior(playerid);
SetPlayerVirtualWorld(playerid, playerid+7341);
SetPlayerCameraPos(playerid, 207.1526, -39.3834, 1002.8735);
SetPlayerCameraLookAt(playerid, 207.5223, -38.4558, 1002.6689);
SetPlayerPos(playerid,209.20, -34.24, 1001.93);
SetPlayerFacingAngle(playerid, 180.0);
SetPlayerInterior(playerid,1);
Skins[playerid] = 1;
KleidungA[playerid] = 1;
KleidungB[playerid] = GetPlayerSkin(playerid);
TextDrawShowForPlayer(playerid, KKleidung1[playerid]);
TextDrawShowForPlayer(playerid, KKleidung2[playerid]);
TextDrawShowForPlayer(playerid, Kleidung1);
TextDrawShowForPlayer(playerid, Kleidung2);
TextDrawShowForPlayer(playerid, SkinIDInfo[playerid]);
format(stringo, sizeof(stringo), "SKIN ID: %d", Skins[playerid]);
TextDrawSetString(SkinIDInfo[playerid], stringo);
SelectTextDraw(playerid, 0xE60005FF);
for(new i = 0; i < 10; i++){SCM(playerid, -1, "");}
SCM(playerid, -1,"{FFFF00}* INFO: {FFFFFF}Tippe: {FFFF00}'/outfitnehmen' {FFFFFF}Um denn Skin zu nutzen.");
SCM(playerid, -1,"{FFFF00}* INFO: {FFFFFF}Tippe: {FFFF00}'/outfitverlassen' {FFFFFF}Um das Geschäft zu verlassen.");
return 1;
}
}
Alles anzeigen
So sieht das alles aus bei OnPlayerClickTextdraw.. entferne ich das Anklickbare Register/Login System... geht der Skinshop wieder.
Code
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == Login) //Anmelden
{
if(gPlayerAccount[playerid] == 1 && gPlayerLogged[playerid] == 0)
{
new string[800];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string,sizeof(string),"{FFFFFF}Willkommen auf {0099FF}SOM Reallife!\n\n{0099FF}_____________________________________\n\n{0099FF}-Dein Name: {FFFFFF}%s\n\n{0099FF}-Forum: {FFFFFF}google.de\n\n{0099FF}-Account: {FFFFFF}Dein Account ist Registriert\n\n{0099FF}-Nutze dein {FFFFFF}Passwort\n\n{0099FF}_____________________________________",name);
SPD(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",string,"Login","Abbruch");
ClearChatbox(playerid,20);
}
else if(gPlayerAccount[playerid] == 0 && gPlayerLogged[playerid] == 0)
{
if(disablereg == true)
{
SCM(playerid, COLOR_GREY, "Die Registration ist zurzeit ausgeschaltet!");
Kick(playerid);
return 1;
}
else
{
SPD(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"Account","Du benötigst einen Account, um auf diesem Server zu spielen!","Erstellen","Abbruch");
}
CancelSelectTextDraw(playerid);
ClearChatbox(playerid,20);
}
}
else if(clickedid == Registration) //Registrieren
{
if(gPlayerAccount[playerid] == 1 && gPlayerLogged[playerid] == 0)
{
new string[80];
format(string,sizeof(string),"%s\nBitte logge dich ein.",SERVERNAME);
SPD(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",string,"Login","Abbruch");
ClearChatbox(playerid,20);
}
else if(gPlayerAccount[playerid] == 0 && gPlayerLogged[playerid] == 0)
{
if(disablereg == true)
{
SCM(playerid, COLOR_GREY, "Die Registration ist zurzeit ausgeschaltet!");
Kick(playerid);
return 1;
}
else
{
SPD(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"Account","Willkommen! Nun kannst du dir einen Account Erstellen.","Erstellen","Abbruch");
}
CancelSelectTextDraw(playerid);
ClearChatbox(playerid,20);
}
}
if(clickedid == Forum)
{
SPD(playerid, DIALOG_FORUM, DIALOG_STYLE_MSGBOX,"{0099FF}FORUM","{FFFFFF}Die Webseite ist {0099FF}Leer","OK","");
}
if(clickedid == Teamspeak)
{
SPD(playerid, DIALOG_TS3, DIALOG_STYLE_MSGBOX,"{0099FF}TEAMSPEAK3","{FFFFFF}Die IP lautet {0099FF}Leer","OK","");
}
if(clickedid == Raus)
{
SPD(playerid, DIALOG_TS3, DIALOG_STYLE_MSGBOX,"{0099FF}TEAMSPEAK3","{FFFFFF}Die IP lautet {0099FF}Leer","OK","");
}
return 1;
}
new string[120];
if(clickedid == KKleidung1[playerid]){
if(Skins[playerid] < 0){
Skins[playerid] = 1;
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
Skins[playerid] --;
SetPlayerSkin(playerid, Skins[playerid]);
format(string, sizeof(string), "SKIN ID: %d", Skins[playerid]);
TextDrawSetString(SkinIDInfo[playerid], string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
}
else if(clickedid == KKleidung2[playerid]){
if(Skins[playerid] > 299){
Skins[playerid] = 298;
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
Skins[playerid] ++;
SetPlayerSkin(playerid, Skins[playerid]);
format(string, sizeof(string), "SKIN ID: %d", Skins[playerid]);
TextDrawSetString(SkinIDInfo[playerid], string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
}
return 1;
}
Alles anzeigen