[Ajuda] Atualizar ModelPreview
#1

Bom, sou muito lerdo para entender como q faz.. Mais como que й msm? kk.
PHP код:
#include <a_samp>
#include <zcmd>
#pragma tabsize 0
new Text:Textdraw0;
new 
Text:Textdraw1;
new 
Text:Textdraw2;
public 
OnPlayerConnect(playerid)
{
new 
veiculo GetVehicleModel(veiculo);
Textdraw0 TextDrawCreate(250.000000156.000000"New Textdraw");
TextDrawBackgroundColor(Textdraw0255);
TextDrawFont(Textdraw05);
TextDrawLetterSize(Textdraw00.5000001.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw00);
TextDrawSetProportional(Textdraw01);
TextDrawSetShadow(Textdraw01);
TextDrawUseBox(Textdraw01);
TextDrawBoxColor(Textdraw0255);
TextDrawTextSize(Textdraw0100.000000121.000000);
veiculo TextDrawSetPreviewModel(Textdraw0560);
TextDrawSetPreviewRot(Textdraw0, -16.0000000.000000, -55.0000001.000000);
TextDrawSetSelectable(Textdraw00);
Textdraw1 TextDrawCreate(199.000000198.000000"<<");
TextDrawBackgroundColor(Textdraw1255);
TextDrawFont(Textdraw11);
TextDrawLetterSize(Textdraw10.8200003.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw10);
TextDrawSetProportional(Textdraw11);
TextDrawSetShadow(Textdraw11);
TextDrawSetSelectable(Textdraw11);
Textdraw2 TextDrawCreate(361.000000198.000000">>");
TextDrawBackgroundColor(Textdraw2255);
TextDrawFont(Textdraw21);
TextDrawLetterSize(Textdraw20.8200003.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw20);
TextDrawSetProportional(Textdraw21);
TextDrawSetShadow(Textdraw21);
TextDrawSetSelectable(Textdraw21);
return 
1;
}
public 
OnPlayerClickTextDraw(playeridText:clickedid)
{
    if(
clickedid == Textdraw1)
    {
          new 
veiculo GetVehicleModel(veiculo);
          
TextDrawHideForPlayer(playeridTextdraw0);
          
TextDrawShowForPlayer(playeridTextdraw0);
          
TextDrawSetPreviewModel(Textdraw0veiculo++);
          return 
1;
    }
    if(
clickedid == Textdraw2)
    {
          new 
veiculo GetVehicleModel(veiculo);
          
TextDrawHideForPlayer(playeridTextdraw0);
          
TextDrawShowForPlayer(playeridTextdraw0);
          
TextDrawSetPreviewModel(Textdraw0veiculo++);
          return 
1;
    }
    return 
1;
}
CMD:carros(playeridparams[])
{
   
TextDrawShowForPlayer(playeridTextdraw0);
   
TextDrawShowForPlayer(playeridTextdraw1);
   
TextDrawShowForPlayer(playeridTextdraw2);
   
SelectTextDraw(playerid0x000000FF);
   return 
1;

Reply
#2

Coloque TextDrawSetPreviewModel acima do TextDrawShowForPlayer nos seus if statements. Veremos se funciona.
Reply
#3

@EDIT

Tentei assim, sу que mostra sу skins, mais ta aproximando certinho, kkkk quero carros ;/
PHP код:
#include <a_samp>
#include <zcmd>
#pragma tabsize 0
new Text:Textdraw0;
new 
Text:Textdraw1;
new 
Text:Textdraw2;
new 
veiculo;
public 
OnPlayerConnect(playerid)
{
Textdraw0 TextDrawCreate(250.000000156.000000"New Textdraw");
TextDrawBackgroundColor(Textdraw0255);
TextDrawFont(Textdraw05);
TextDrawLetterSize(Textdraw00.5000001.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw00);
TextDrawSetProportional(Textdraw01);
TextDrawSetShadow(Textdraw01);
TextDrawUseBox(Textdraw01);
TextDrawBoxColor(Textdraw0255);
TextDrawTextSize(Textdraw0100.000000121.000000);
veiculo TextDrawSetPreviewModel(Textdraw0400);
TextDrawSetPreviewRot(Textdraw0, -16.0000000.000000, -55.0000001.000000);
TextDrawSetSelectable(Textdraw00);
Textdraw1 TextDrawCreate(199.000000198.000000"<<");
TextDrawBackgroundColor(Textdraw1255);
TextDrawFont(Textdraw11);
TextDrawLetterSize(Textdraw10.8200003.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw10);
TextDrawSetProportional(Textdraw11);
TextDrawSetShadow(Textdraw11);
TextDrawSetSelectable(Textdraw11);
Textdraw2 TextDrawCreate(361.000000198.000000">>");
TextDrawBackgroundColor(Textdraw2255);
TextDrawFont(Textdraw21);
TextDrawLetterSize(Textdraw20.8200003.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw20);
TextDrawSetProportional(Textdraw21);
TextDrawSetShadow(Textdraw21);
TextDrawSetSelectable(Textdraw21);
return 
1;
}
public 
OnPlayerClickTextDraw(playeridText:clickedid)
{
    if(
clickedid == Textdraw1)
    {
          
TextDrawHideForPlayer(playeridTextdraw0);
          
TextDrawSetPreviewModel(Textdraw0veiculo++);
          
TextDrawShowForPlayer(playeridTextdraw0);
          return 
1;
    }
    if(
clickedid == Textdraw2)
    {
          
TextDrawHideForPlayer(playeridTextdraw0);
          
TextDrawSetPreviewModel(Textdraw0veiculo++);
          
TextDrawShowForPlayer(playeridTextdraw0);
          return 
1;
    }
    return 
1;
}
CMD:carros(playeridparams[])
{
   
TextDrawShowForPlayer(playeridTextdraw0);
   
TextDrawShowForPlayer(playeridTextdraw1);
   
TextDrawShowForPlayer(playeridTextdraw2);
   
SelectTextDraw(playerid0x000000FF);
   return 
1;

Reply
#4

Nesse caso, GetVehicleModel estб a retornar 0.

Coloque um screenshot, por favor.
Reply
#5

Jб consegui. Vlww <3 Usei um raciocinio Bбsico.
Reply
#6

Уtimo! Partilhe a sua soluзгo para dъvidas futuras!
E peзo desculpa por nгo conseguir ter ajudado mais.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)