Szerző Téma: Karácsonyfa  (Megtekintve 806 alkalommal)

Karácsonyfa
« Dátum: 2011. november 03. - 01:36:01 »
0 Show voters
Sziasztok! Segítségetek kérném! Találtam karácsonyra egy kis karácsonyfa scriptet :D és azt szeretném, hogy ne keljen parancsot beírni, ahhoz, hogy mutassa, hanem ahogy csatlakozik a játékos, már kint is legyen neki. A kód a következõ:
[pawn]
#include < a_samp  >
#define V03c
#define COL_ORANGE         \"{FFAF00}\"
#define COL_GREEN          \"{6EF83C}\"
#define COL_RED            \"{FF4040}\"
#define COL_BLUE           \"{0285FF}\"
#define COL_YELLOW         \"{FFEA02}\"
#define COL_EASY           \"{85D5FF}\"
forward  LoadTree(  );
     ChangeColors(  );
     UpdateTree(  );
     DestroyTree(  );
     HideTree(  playerid  );
     ShowTree(  playerid  );
     
stock RGBA(R, G, B, A) return ( R * 16777216 ) + ( G * 65536 ) + ( B * 256 ) + A ;
new
Text:ChristmasTree[23],
RedValue,
BlueValue,
GreenValue,
Phase,
PhaseTimes,
bool:pTree[ MAX_PLAYERS ]
;
public
   OnFilterScriptInit(   )
{
    SetTimer(  \"ChangeColors\" , 50, true   );
LoadTree(  );
return true;
}
public
   OnFilterScriptExit(   )
{
DestroyTree(  );
return true;
}
public OnPlayerCommandText( playerid, cmdtext[] )
{
if ( strcmp ( cmdtext, \"/fa\", true ) == 0 )
{
    if ( pTree[ playerid ] == true )
    {
        pTree[ playerid ] = true ;
        #if defined V03c
         #else
        #endif
        HideTree(  playerid  );
    }
    else
    {
        pTree[ playerid ] = true ;
        #if defined V03c
        #else
        #endif
        ShowTree(  playerid  );
    }
    return true;
}
return false;
}
public
   OnPlayerConnect(  playerid  )
{
pTree[ playerid ] = true ;
#if defined V03c
#else
#endif
ShowTree(   playerid   );
    return true;
}
public
   UpdateTree(  )
{
TextDrawColor( Text:ChristmasTree[ 10 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
TextDrawColor( Text:ChristmasTree[ 11 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
TextDrawBackgroundColor( Text:ChristmasTree[ 10 ],  RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
TextDrawBackgroundColor( Text:ChristmasTree[ 11 ],  RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
TextDrawSetOutline( ChristmasTree[ 10 ], 1);
TextDrawSetOutline( ChristmasTree[ 11 ], 1);
}
public
   ChangeColors( )
{
for ( new playerid = 0; playerid < MAX_PLAYERS; playerid++ )
{
    if ( IsPlayerConnected( playerid ) )
    {
        if ( pTree[ playerid ] == false ) return 0;
    }
}
if ( Phase == 0 )
{
   RedValue += 5;
   UpdateTree( );
        TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
   TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
   if ( RedValue == 255 )Phase = 1;
}
else if ( Phase == 1 )
{
   RedValue -= 5;
    BlueValue += 5;
   UpdateTree( );
   TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
   TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
   if ( BlueValue == 255  )Phase = 2;
}
else if ( Phase == 2 )
{
     GreenValue += 5;
     BlueValue -= 5;
   UpdateTree( );
   TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
   TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
   if ( GreenValue == 255  )Phase = 3;
}
else if ( Phase == 3 )
{
    RedValue += 5;
     GreenValue -= 5;
   UpdateTree( );
   TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
   TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
   if ( RedValue == 255  )Phase = 4;
}
else if ( Phase == 4 )
{
    PhaseTimes += 1;
    if ( PhaseTimes == 1 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
       TextDrawColor(ChristmasTree[ 16 ], -36561153);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
    }
    if ( PhaseTimes == 2 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
       TextDrawColor(ChristmasTree[ 16 ], -65281);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
    }
    if ( PhaseTimes == 3 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
       TextDrawColor(ChristmasTree[ 16 ], -36561153);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
    }
    if ( PhaseTimes == 4 )
    {
        TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
       TextDrawColor(ChristmasTree[ 16 ], -65281);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
   }
   if ( PhaseTimes == 5 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
       TextDrawColor(ChristmasTree[ 16 ], -36561153);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
   }
   if ( PhaseTimes == 6 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
       TextDrawColor(ChristmasTree[ 16 ], -65281);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
    }
    if ( PhaseTimes == 7 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
       TextDrawColor(ChristmasTree[ 16 ], -36561153);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
    }
    if ( PhaseTimes == 8 )
    {
        TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
       TextDrawColor(ChristmasTree[ 16 ], -65281);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
   }
   if ( PhaseTimes == 9 )
    {
       TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
       TextDrawColor(ChristmasTree[ 16 ], -36561153);
       TextDrawShowForAll(ChristmasTree[ 16 ] );
       Phase = 1;
       PhaseTimes = 0;
   }
}
return 1;
}
public
   DestroyTree(  )
{
for ( new i = 0; i < 22; i ++ ) TextDrawHideForAll( Text:ChristmasTree[ i ] ),
                        TextDrawDestroy( Text:ChristmasTree[ i ] );
}
public LoadTree(  )
{
ChristmasTree[ 0 ] = TextDrawCreate(585.000000, 403.000000, \"~n~\");
TextDrawBackgroundColor(ChristmasTree[ 0 ], 255);
TextDrawFont(ChristmasTree[ 0 ], 1);
TextDrawLetterSize(ChristmasTree[ 0 ], 0.500000, 4.799999);
TextDrawColor(ChristmasTree[ 0 ], -1);
TextDrawSetOutline(ChristmasTree[ 0 ], 0);
TextDrawSetProportional(ChristmasTree[ 0 ], 1);
TextDrawSetShadow(ChristmasTree[ 0 ], 1);
TextDrawUseBox(ChristmasTree[ 0 ], 1);
TextDrawBoxColor(ChristmasTree[ 0 ], -1975123713);
TextDrawTextSize(ChristmasTree[ 0 ], 564.000000, 20.000000);
ChristmasTree[ 1 ] = TextDrawCreate(542.000000, 404.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 1 ], 255);
TextDrawFont(ChristmasTree[ 1 ], 1);
TextDrawLetterSize(ChristmasTree[ 1 ], 2.499999, 3.199999);
TextDrawColor(ChristmasTree[ 1 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 1 ], 0);
TextDrawSetProportional(ChristmasTree[ 1 ], 1);
TextDrawSetShadow(ChristmasTree[ 1 ], 0);
ChristmasTree[ 2 ] = TextDrawCreate(607.000000, 404.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 2 ], 255);
TextDrawFont(ChristmasTree[ 2 ], 1);
TextDrawLetterSize(ChristmasTree[ 2 ], -2.499999, 3.199999);
TextDrawColor(ChristmasTree[ 2 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 2 ], 0);
TextDrawSetProportional(ChristmasTree[ 2 ], 1);
TextDrawSetShadow(ChristmasTree[ 2 ], 0);
ChristmasTree[ 3 ] = TextDrawCreate(599.000000, 391.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 3 ], 255);
TextDrawFont(ChristmasTree[ 3 ], 1);
TextDrawLetterSize(ChristmasTree[ 3 ], -1.789999, 3.199999);
TextDrawColor(ChristmasTree[ 3 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 3 ], 0);
TextDrawSetProportional(ChristmasTree[ 3 ], 1);
TextDrawSetShadow(ChristmasTree[ 3 ], 0);
ChristmasTree[ 4 ] = TextDrawCreate(549.000000, 391.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 4 ], 255);
TextDrawFont(ChristmasTree[ 4 ], 1);
TextDrawLetterSize(ChristmasTree[ 4 ], 1.799999, 3.199999);
TextDrawColor(ChristmasTree[ 4 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 4 ], 0);
TextDrawSetProportional(ChristmasTree[ 4 ], 1);
TextDrawSetShadow(ChristmasTree[ 4 ], 0);
ChristmasTree[ 5 ] = TextDrawCreate(596.000000, 379.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 5 ], 255);
TextDrawFont(ChristmasTree[ 5 ], 1);
TextDrawLetterSize(ChristmasTree[ 5 ], -1.679998, 3.199999);
TextDrawColor(ChristmasTree[ 5 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 5 ], 0);
TextDrawSetProportional(ChristmasTree[ 5 ], 1);
TextDrawSetShadow(ChristmasTree[ 5 ], 0);
ChristmasTree[ 6 ] = TextDrawCreate(553.000000, 379.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 6 ], 255);
TextDrawFont(ChristmasTree[ 6 ], 1);
TextDrawLetterSize(ChristmasTree[ 6 ], 1.500000, 3.199999);
TextDrawColor(ChristmasTree[ 6 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 6 ], 0);
TextDrawSetProportional(ChristmasTree[ 6 ], 1);
TextDrawSetShadow(ChristmasTree[ 6 ], 0);
ChristmasTree[ 7 ] = TextDrawCreate(594.000000, 363.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 7 ], 255);
TextDrawFont(ChristmasTree[ 7 ], 0);
TextDrawLetterSize(ChristmasTree[ 7 ], -1.359998, 4.199998);
TextDrawColor(ChristmasTree[ 7 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 7 ], 0);
TextDrawSetProportional(ChristmasTree[ 7 ], 1);
TextDrawSetShadow(ChristmasTree[ 7 ], 0);
ChristmasTree[ 8 ] = TextDrawCreate(554.000000, 361.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 8 ], 255);
TextDrawFont(ChristmasTree[ 8 ], 0);
TextDrawLetterSize(ChristmasTree[ 8 ], 1.500000, 4.499999);
TextDrawColor(ChristmasTree[ 8 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 8 ], 0);
TextDrawSetProportional(ChristmasTree[ 8 ], 1);
TextDrawSetShadow(ChristmasTree[ 8 ], 0);
ChristmasTree[ 9 ] = TextDrawCreate(585.000000, 382.000000, \"~n~\");
TextDrawBackgroundColor(ChristmasTree[ 9 ], 255);
TextDrawFont(ChristmasTree[ 9 ], 1);
TextDrawLetterSize(ChristmasTree[ 9 ], 0.509998, 4.299999);
TextDrawColor(ChristmasTree[ 9 ], -1);
TextDrawSetOutline(ChristmasTree[ 9 ], 0);
TextDrawSetProportional(ChristmasTree[ 9 ], 1);
TextDrawSetShadow(ChristmasTree[ 9 ], 1);
TextDrawUseBox(ChristmasTree[ 9 ], 1);
TextDrawBoxColor(ChristmasTree[ 9 ], 934019327);
TextDrawTextSize(ChristmasTree[ 9 ], 564.000000, 20.000000);
ChristmasTree[ 10 ] = TextDrawCreate(549.000000, 420.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 10 ], 65535);
TextDrawFont(ChristmasTree[ 10 ], 0);
TextDrawLetterSize(ChristmasTree[ 10 ], 3.109998, -1.700000);
TextDrawColor(ChristmasTree[ 10 ], 65535);
TextDrawSetOutline(ChristmasTree[ 10 ], 1);
TextDrawSetProportional(ChristmasTree[ 10 ], 1);
ChristmasTree[ 11 ] = TextDrawCreate(555.000000, 400.000000, \"/\");
TextDrawBackgroundColor(ChristmasTree[ 11 ], 65535);
TextDrawFont(ChristmasTree[ 11 ], 0);
TextDrawLetterSize(ChristmasTree[ 11 ], 2.589998, -1.700000);
TextDrawColor(ChristmasTree[ 11 ], 65535);
TextDrawSetOutline(ChristmasTree[ 11 ], 1);
TextDrawSetProportional(ChristmasTree[ 11 ], 1);
ChristmasTree[ 12 ] = TextDrawCreate(554.000000, 435.000000, \"~w~~h~T~n~  ~p~~h~T~n~~n~ ~r~~h~T   ~b~~h~T\");
TextDrawBackgroundColor(ChristmasTree[ 12 ], -65281);
TextDrawFont(ChristmasTree[ 12 ], 1);
TextDrawLetterSize(ChristmasTree[ 12 ], 0.300000, -1.100000);
TextDrawColor(ChristmasTree[ 12 ], -65281);
TextDrawSetOutline(ChristmasTree[ 12 ], 0);
TextDrawSetProportional(ChristmasTree[ 12 ], 1);
TextDrawSetShadow(ChristmasTree[ 12 ], 0);
ChristmasTree[ 13 ] = TextDrawCreate(565.000000, 411.000000, \"~y~~h~T~n~~n~~r~~h~T\");
TextDrawBackgroundColor(ChristmasTree[ 13 ], -65281);
TextDrawFont(ChristmasTree[ 13 ], 1);
TextDrawLetterSize(ChristmasTree[ 13 ], 0.300000, -1.100000);
TextDrawColor(ChristmasTree[ 13 ], -65281);
TextDrawSetOutline(ChristmasTree[ 13 ], 0);
TextDrawSetProportional(ChristmasTree[ 13 ], 1);
TextDrawSetShadow(ChristmasTree[ 13 ], 0);
ChristmasTree[ 14 ] = TextDrawCreate(544.000000, 440.000000, \"~y~~h~T          ~b~~h~~h~T\");
TextDrawBackgroundColor(ChristmasTree[ 14 ], -65281);
TextDrawFont(ChristmasTree[ 14 ], 1);
TextDrawLetterSize(ChristmasTree[ 14 ], 0.300000, -1.100000);
TextDrawColor(ChristmasTree[ 14 ], -65281);
TextDrawSetOutline(ChristmasTree[ 14 ], 0);
TextDrawSetProportional(ChristmasTree[ 14 ], 1);
TextDrawSetShadow(ChristmasTree[ 14 ], 0);
ChristmasTree[ 15 ] = TextDrawCreate(524.000000, 427.000000, \"O\");
TextDrawBackgroundColor(ChristmasTree[ 15 ], 255);
TextDrawFont(ChristmasTree[ 15 ], 1);
TextDrawLetterSize(ChristmasTree[ 15 ], 3.499998, 8.000000);
TextDrawColor(ChristmasTree[ 15 ], -1);
TextDrawSetOutline(ChristmasTree[ 15 ], 0);
TextDrawSetProportional(ChristmasTree[ 15 ], 1);
TextDrawSetShadow(ChristmasTree[ 15 ], 1);
ChristmasTree[ 16 ] = TextDrawCreate(561.000000, 358.000000, \"]\");
TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
TextDrawFont(ChristmasTree[ 16 ], 0);
TextDrawLetterSize(ChristmasTree[ 16 ], 0.800000, 2.499999);
TextDrawColor(ChristmasTree[ 16 ], -36561153);
TextDrawSetOutline(ChristmasTree[ 16 ], 0);
TextDrawSetProportional(ChristmasTree[ 16 ], 1);
TextDrawSetShadow(ChristmasTree[ 16 ], 1);
ChristmasTree[ 17 ] = TextDrawCreate(581.000000, 422.000000, \"~r~~h~~h~T\");
TextDrawBackgroundColor(ChristmasTree[ 17 ], -65281);
TextDrawFont(ChristmasTree[ 17 ], 1);
TextDrawLetterSize(ChristmasTree[ 17 ], 0.300000, -1.100000);
TextDrawColor(ChristmasTree[ 17 ], -65281);
TextDrawSetOutline(ChristmasTree[ 17 ], 0);
TextDrawSetProportional(ChristmasTree[ 17 ], 1);
TextDrawSetShadow(ChristmasTree[ 17 ], 0);
ChristmasTree[ 18 ] = TextDrawCreate(582.000000, 422.000000, \"O\");
TextDrawBackgroundColor(ChristmasTree[ 18 ], -1);
TextDrawFont(ChristmasTree[ 18 ], 1);
TextDrawLetterSize(ChristmasTree[ 18 ], 3.499998, 8.000000);
TextDrawColor(ChristmasTree[ 18 ], -1);
TextDrawSetOutline(ChristmasTree[ 18 ], 0);
TextDrawSetProportional(ChristmasTree[ 18 ], 1);
TextDrawSetShadow(ChristmasTree[ 18 ], 3);
ChristmasTree[ 19 ] = TextDrawCreate(569.000000, 384.000000, \"O\");
TextDrawBackgroundColor(ChristmasTree[ 19 ], 934019327);
TextDrawFont(ChristmasTree[ 19 ], 1);
TextDrawLetterSize(ChristmasTree[ 19 ], 0.409999, -0.800000);
TextDrawColor(ChristmasTree[ 19 ], 934019327);
TextDrawSetOutline(ChristmasTree[ 19 ], 1);
TextDrawSetProportional(ChristmasTree[ 19 ], 1);
ChristmasTree[ 20 ] = TextDrawCreate(560.000000, 430.000000, \"~r~~h~Boldog~n~~i~Karacsonyt!\");
TextDrawBackgroundColor(ChristmasTree[ 20 ], -1);
TextDrawFont(ChristmasTree[ 20 ], 3);
TextDrawLetterSize(ChristmasTree[ 20 ], 0.360000, 1.000000);
TextDrawColor(ChristmasTree[ 20 ], 255);
TextDrawSetOutline(ChristmasTree[ 20 ], 0);
TextDrawSetProportional(ChristmasTree[ 20 ], 1);
TextDrawSetShadow(ChristmasTree[ 20 ], -1);
ChristmasTree[ 21 ] = TextDrawCreate(539.000000, 400.000000, \".     ~n~  .  .    .      . ~n~ .   .   .     . .  .~n~     .    . ~n~ .    .       .       . ~n~    .    .     .  . ~n~ .  .   \");
TextDrawBackgroundColor(ChristmasTree[ 21 ], 255);
TextDrawFont(ChristmasTree[ 21 ], 1);
TextDrawLetterSize(ChristmasTree[ 21 ], 0.240000, 0.699999);
TextDrawColor(ChristmasTree[ 21 ], -1);
TextDrawSetOutline(ChristmasTree[ 21 ], 0);
TextDrawSetProportional(ChristmasTree[ 21 ], 1);
TextDrawSetShadow(ChristmasTree[ 21 ], 0);
ChristmasTree[ 22 ] = TextDrawCreate(638.000000, 360.000000, \".     ~n~  .  .    .      . ~n~ .   .   .     . .  .~n~     .    . ~n~ .    .       .       . ~n~    .    .     .  . ~n~ .  .   \");
TextDrawAlignment(ChristmasTree[ 22 ], 3);
TextDrawBackgroundColor(ChristmasTree[ 22 ], -1);
TextDrawFont(ChristmasTree[ 22 ], 0);
TextDrawLetterSize(ChristmasTree[ 22 ], 0.270000, 1.000000);
TextDrawColor(ChristmasTree[ 22 ], -1);
TextDrawSetOutline(ChristmasTree[ 22 ], 0);
TextDrawSetProportional(ChristmasTree[ 22 ], 1);
TextDrawSetShadow(ChristmasTree[ 22 ], -8);
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
   if(IsPlayerConnected(playerid))
   {
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 0 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 1 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 2 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 3 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 4 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 5 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 6 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 7 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 8 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 9 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 10 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 11 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 12 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 13 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 14 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 15 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 16 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 17 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 18 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 19 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 20 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 21 ] );
      TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 22 ] );
   }
}
}
public
   ShowTree( playerid )
{
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 0 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 1 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 2 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 3 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 4 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 5 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 6 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 7 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 8 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 9 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 10 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 11 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 12 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 13 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 14 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 15 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 16 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 17 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 18 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 19 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 20 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 21 ] );
TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 22 ] );
}
public
   HideTree( playerid )
{
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 0 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 1 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 2 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 3 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 4 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 5 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 6 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 7 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 8 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 9 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 10 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 11 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 12 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 13 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 14 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 15 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 16 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 17 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 18 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 19 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 20 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 21 ] );
TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 22 ] );
}
[/pawn]

]XziBiT[

  • Vendég
Karácsonyfa
« Válasz #1 Dátum: 2011. november 03. - 06:50:18 »
0 Show voters
Ami a parancsnál van szerintem tedd, az OnPlayerSpawn alá! És amikor lespawnolsz a játékba olyan mint ha beírtad volna a parancsot. :)

Karácsonyfa
« Válasz #2 Dátum: 2011. november 03. - 10:23:48 »
0 Show voters
error 025: function heading differs from prototype  :(

Nem elérhető Dead

  • 2045
    • Profil megtekintése
Karácsonyfa
« Válasz #3 Dátum: 2011. november 03. - 11:32:04 »
0 Show voters
Neik sorban van error? Vagy hogy csináltad?
Másold be sztem.  Hazaérek oszt ránézek :)

]XziBiT[

  • Vendég
Karácsonyfa
« Válasz #4 Dátum: 2011. november 03. - 11:47:27 »
0 Show voters
public OnPlayerSpawn(playerid)
{
    if ( pTree[ playerid ] == true )
    {
        pTree[ playerid ] = true ;
        #if defined V03c
 
         #else
 
        #endif
        HideTree(  playerid  );
    }
    else
    {
        pTree[ playerid ] = true ;
        #if defined V03c
 
        #else
 
        #endif
        ShowTree(  playerid  );
    }
    return true;
}

 
Csak a return 1; } et le kellett venni a végérõl!

Karácsonyfa
« Válasz #5 Dátum: 2011. november 03. - 12:01:15 »
0 Show voters
Mûködik!!!  :P Örök hálám   ^-^ ^-^

]XziBiT[

  • Vendég
Karácsonyfa
« Válasz #6 Dátum: 2011. november 03. - 12:04:18 »
0 Show voters
Mûködik!!!  :P Örök hálám   ^-^ ^-^[/quote]
Nincs mit! :) zárd a témát! ^-^

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal