Advertisement
JonathanFeitosa

JFS 3DTextLabel em Veículos com Mensagens e Cores Aleatórias

Jan 26th, 2013
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.64 KB | None | 0 0
  1. /* Criado Por [JFS]Jonathan Feitosa !!
  2.  
  3. Contato MSN: jonathan_feitosa@hotmail.com.br
  4. Skype: jonathanfeitosajfs
  5. Visite: www.fb.com/GoHumorGTA
  6.  
  7. Postado Dia: 26/01/2012 !
  8. */
  9.  
  10. #include <a_samp>
  11.  
  12. #define JFSAtualizarRandom  \
  13.                     (3)
  14. #define MaxVehicles         \
  15.                     (200)
  16. #define JFSRaio         \
  17.                     (30.0)
  18. #define Altura          \
  19.                     (0.3)
  20. #define NumeroMensagens     \
  21.                     (4)
  22. #define NumeroCores         \
  23.                     (4)
  24.  
  25. new JFSRandomVeiculos[NumeroMensagens][] =
  26. {
  27.     "Este Veiculo é Livre !",
  28.     "Este Veiculo é do Servidor !",
  29.     "Use esse Veiculo !",
  30.     "Criado Por Jonathan Feitosa"
  31. };
  32.  
  33. new JFSRandomCores[NumeroCores] =
  34. {
  35.     0xFF0000FF,
  36.     -1,
  37.     0xFFFF00AA,
  38.     0x00FFFFAA
  39. };
  40.  
  41. new Text3D:JFSLVeiculo[MaxVehicles], TempoJFS;
  42.  
  43. public OnGameModeInit()
  44. {
  45.    new Random = random(sizeof(JFSRandomVeiculos)), RandomCOR = random(sizeof(JFSRandomCores));
  46.    for(new i = 0; i < MaxVehicles; ++i)
  47.    {
  48.     JFSLVeiculo[i] = Create3DTextLabel(JFSRandomVeiculos[Random], JFSRandomCores[RandomCOR], 0.0, 0.0, 0.0, JFSRaio, 0);
  49.     Attach3DTextLabelToVehicle(JFSLVeiculo[i], i, 0.0, 0.0, Altura);
  50.    }
  51.    TempoJFS = SetTimer("JFSRandomTimerVeiculos", JFSAtualizarRandom*1000, true);
  52.    return true;
  53. }
  54.  
  55. public OnGameModeExit()
  56. {
  57.     for(new i = 0; i < MaxVehicles; ++i) Delete3DTextLabel(JFSLVeiculo[i]);
  58.     return KillTimer(TempoJFS), true;
  59. }
  60.  
  61. forward JFSRandomTimerVeiculos();
  62. public JFSRandomTimerVeiculos()
  63. {
  64.     new Random = random(sizeof(JFSRandomCores)), RandomCOR = random(sizeof(JFSRandomCores));
  65.     for(new i = 0; i < MaxVehicles; ++i) Update3DTextLabelText(JFSLVeiculo[i], JFSRandomCores[RandomCOR], JFSRandomVeiculos[Random]);
  66.     return true;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement