Problema con textdraws clickeables en 0.3.7 RC-3. Bug? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Problema con textdraws clickeables en 0.3.7 RC-3. Bug? (
/showthread.php?tid=569159)
Problema con textdraws clickeables en 0.3.7 RC-3. Bug? -
CrossOv3r - 28.03.2015
Hace ya rato que tengo un problema con estos textdraws clickeables, al clickearlos en el juego las funciones no se ejecutan.
pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == Textdraw1[playerid] || Textdraw0[playerid] || Textdraw2[playerid] || Textdraw3[playerid] || Textdraw4[playerid] || Textdraw5[playerid])
{
print("Exito");
if(strcmp(FaccionActual[playerid], "Ley", false, 30))
{
PlayerTextDrawSetString(playerid, Textdraw5[playerid], "Desorden");
format(FaccionActual[playerid], 30, "Desorden");
}
if(strcmp(FaccionActual[playerid], "Desorden", false, 30))
{
PlayerTextDrawSetString(playerid, Textdraw5[playerid], "Ley");
format(FaccionActual[playerid], 30, "Ley");
}
}
return 1;
}
Estos estan en "OnPlayerRequestClass".
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
new string[128];
new Nombre[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pPrimeraVezJugando] == 1)
{
//REGISTRO DE CARACTER
PlayerTextDrawShow(playerid, Textdraw0[playerid]);
PlayerTextDrawShow(playerid, Textdraw1[playerid]);
PlayerTextDrawShow(playerid, Textdraw2[playerid]);
PlayerTextDrawShow(playerid, Textdraw3[playerid]);
PlayerTextDrawShow(playerid, Textdraw4[playerid]);
PlayerTextDrawShow(playerid, Textdraw5[playerid]);
PlayerTextDrawShow(playerid, Textdraw6[playerid]);
PlayerTextDrawShow(playerid, Textdraw7[playerid]);
PlayerTextDrawShow(playerid, Textdraw8[playerid]);
/* OMITН DATOS */
SelectTextDraw(playerid, 0xFF4040AA); // << DEBERIA IR BIEN.
}
return 1;
}
Al momento de entrar al juego, ni el efecto
hover se aplica, no sй por que.
Respuesta: Problema con textdraws clickeables en 0.3.7 RC-3. Bug? -
OTACON - 28.03.2015
no se, pero ese if esta mal..
Код:
if(playertextid == Textdraw1[playerid] || Textdraw0[playerid] || Textdraw2[playerid] || Textdraw3[playerid] || Textdraw4[playerid] || Textdraw5[playerid])
Код:
if(playertextid == Textdraw1[playerid] || playertextid == Textdraw0[playerid] || playertextid == Textdraw2[playerid] || playertextid == Textdraw3[playerid] || playertextid == Textdraw4[playerid] || playertextid == Textdraw5[playerid])
es asi:
Код:
playertextid == Textdraw1[playerid] || playertextid == Textdraw1[playerid]
no asi:
Код:
playertextid == Textdraw1[playerid] || Textdraw1[playerid]
si se te hace muy larga la linea utiliza stock o switch
saludos.
Re: Problema con textdraws clickeables en 0.3.7 RC-3. Bug? -
CrossOv3r - 28.03.2015
Igual sigue sin funcionar :/
Respuesta: Problema con textdraws clickeables en 0.3.7 RC-3. Bug? -
OTACON - 28.03.2015
tus textdraw tienen PlayerTextDrawTextSize y PlayerTextDrawSetSelectable, quizбs ahн este el problema.
PD: bug no es , ami me funciona perfecto la funciуn clickeable.