Diogo_Bras

Untitled

Apr 23rd, 2011
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.25 KB | None | 0 0
  1. //Topo
  2. new Text:jInfo[MAX_PLAYERS];
  3. new Text:jInfo2[MAX_PLAYERS];
  4. new Text:jInfo3[MAX_PLAYERS];
  5. new Text:jVida[MAX_PLAYERS];
  6. new Text:jConectar[MAX_PLAYERS];
  7. new Text:jConectar2[MAX_PLAYERS];
  8. new bool:Conectado = false;
  9.  
  10. //OnPlayerConnect
  11. jInfo[playerid] = TextDrawCreate(-1.000000, 420.000000, " ~b~Brasil ~w~Player ~b~Conspired ~w~[~b~RP~w~]");    
  12.     jInfo2[playerid] = TextDrawCreate(-1.000000, 429.000000, "_");    
  13.     jInfo3[playerid] = TextDrawCreate(-1.000000, 438.000000, "_");    
  14.     jVida[playerid] = TextDrawCreate(560.000000, 67.000000, "_");    
  15.     jConectar[playerid] = TextDrawCreate(0.000000,2.000000, "~b~.");
  16.     jConectar2[playerid] = TextDrawCreate(1.000000,359.000000, "~b~.");    
  17.     TextDrawBackgroundColor(jInfo[playerid], 0x000000ff);                
  18.     TextDrawBackgroundColor(jInfo2[playerid], 0x000000ff);              
  19.     TextDrawBackgroundColor(jInfo3[playerid], 0x000000ff);          
  20.     TextDrawBackgroundColor(jVida[playerid], 0x000000ff);    
  21.     TextDrawBackgroundColor(jConectar[playerid], 0x000000ff);    
  22.     TextDrawBackgroundColor(jConectar2[playerid], 0x000000ff);    
  23.     TextDrawFont(jInfo[playerid], 1);                      
  24.     TextDrawFont(jInfo2[playerid], 1);                        
  25.     TextDrawFont(jInfo3[playerid], 1);                      
  26.     TextDrawFont(jVida[playerid], 1);    
  27.     TextDrawFont(jConectar[playerid], 3);    
  28.     TextDrawFont(jConectar2[playerid], 3);    
  29.     TextDrawLetterSize(jInfo[playerid], 0.299999,1.100000);    
  30.     TextDrawLetterSize(jInfo2[playerid], 0.299999,1.100000);    
  31.     TextDrawLetterSize(jInfo3[playerid], 0.299999,1.100000);    
  32.     TextDrawLetterSize(jVida[playerid], 0.400000,0.900000);    
  33.     TextDrawLetterSize(jConectar[playerid], 1.000000,10.800004);    
  34.     TextDrawLetterSize(jConectar2[playerid], 0.899999,11.800008);    
  35.     TextDrawSetOutline(jInfo[playerid], 1);    
  36.     TextDrawSetOutline(jInfo2[playerid], 1);    
  37.     TextDrawSetOutline(jInfo3[playerid], 1);                  
  38.     TextDrawSetOutline(jVida[playerid], 1);    
  39.     TextDrawSetOutline(jConectar[playerid], 1);    
  40.     TextDrawSetOutline(jConectar2[playerid], 1);    
  41.     TextDrawSetProportional(jInfo[playerid], 1);    
  42.     TextDrawSetProportional(jInfo2[playerid], 1);    
  43.     TextDrawSetProportional(jInfo3[playerid], 1);    
  44.     TextDrawSetProportional(jVida[playerid], 1);    
  45.     TextDrawSetProportional(jConectar[playerid], 1);    
  46.     TextDrawSetProportional(jConectar2[playerid], 1);    
  47.     TextDrawUseBox(jConectar[playerid], 1); //Box preta ao conectar (Topo)  
  48.     TextDrawUseBox(jConectar2[playerid], 1); //Box preta ao conectar (Baixo)    
  49.     TextDrawBoxColor(jConectar[playerid], 0x00000099);    
  50.     TextDrawBoxColor(jConectar2[playerid], 0x00000099);    
  51.     TextDrawShowForPlayer(playerid, jConectar[playerid]);
  52.     TextDrawShowForPlayer(playerid, jConectar2[playerid]);  
  53.  
  54. //OnPlayerSpawn
  55.     TextDrawDestroy(jConectar[playerid]);    
  56.     TextDrawDestroy(jConectar2[playerid]);
  57.     TextDrawShowForPlayer(playerid, jInfo[playerid]);
  58.     TextDrawShowForPlayer(playerid, jInfo2[playerid]);
  59.     TextDrawShowForPlayer(playerid, jInfo3[playerid]);
  60.     TextDrawShowForPlayer(playerid, jVida[playerid]);
  61.     SetTimer("OnPlayerSpawn2", 500, true);
  62.  
  63. forward OnPlayerSpawn2(playerid, targetid);
  64. public OnPlayerSpawn2(playerid, targetid)
  65. {
  66.    if(Conectado == false)  
  67.    {
  68.       new sStrDD[256], sStrDDD[256], sStrD[256];    
  69.       new Float:Vida;
  70.       new level = PlayerInfo[targetid][pLevel];
  71.       new exp = PlayerInfo[targetid][pExp];    
  72.       new nxtlevel = PlayerInfo[targetid][pLevel]+1;
  73.       new expamount = nxtlevel*levelexp;
  74.       new account = PlayerInfo[targetid][pAccount];
  75.       GetPlayerHealth(playerid, Vida);
  76.       format(sStrD, sizeof(sStrD), "%0.1f", Vida);  
  77.       format(sStrDD, sizeof(sStrDD), " ~y~Level: ~w~%d  ~p~Respeito: ~w~%d/%d", level, exp, expamount);    
  78.       format(sStrDDD, sizeof(sStrDDD), " ~r~R$: ~w~%d  ~b~Banco ~w~%d  ~p~Conta: ~w~Normal                                          ~b~www.brasilplayerconspired.net", GetPlayerGP(targetid), account);
  79.       TextDrawSetString(jVida[playerid], sStrD);
  80.       TextDrawSetString(jInfo2[playerid], sStrDD);    
  81.       TextDrawSetString(jInfo3[playerid], sStrDDD);
  82.    }
  83.    return true;    
  84. }
Advertisement
Add Comment
Please, Sign In to add comment