JestemSuperLIKE
Początkujący grafik
Wiek: 27 Na forum: 3694 dni Posty: 133
Piwa : 6
Cze. Mam taki problem. Jak gracz jest jaki? i ma 0 zlece?, a jak ja wchodz? to mi wy?wietla td ?e mam 0 zlece?, a przecie? w bazie mam zrobione 1 zlecenie. A jak gracz wychodzi, i ja ponownie wchodz? to mi wczytuje te 1 zlecenie. Czemu tak? Wie kto? jak to rozwi?za??
Pawn
new PlayerText : Ilosc_Zlecen [ MAX_PLAYERS ];
w OnGameModeInit:
Pawn
SetTimer ( "Odswiez" , 1000 , true );
Pawn
forward Odswiez ( playerid );
public Odswiez ( playerid )
{
new s_td1 [ 25 ];
format ( s_td1 , sizeof ( s_td1 ), "Zlecenia:_%d" , Player [ playerid ][ Zlecenia ]);
PlayerTextDrawSetString ( playerid , Ilosc_Zlecen [ playerid ], s_td1 );
return 1 ;
}
w OnPlayerConnect
Pawn
PlayerCreateTD ( playerid )
{
Ilosc_Zlecen [ playerid ] = CreatePlayerTextDraw ( playerid , 580.000000 , 435.000000 , "Zlecenia:_0" );
PlayerTextDrawFont ( playerid , Ilosc_Zlecen [ playerid ], 1 );
PlayerTextDrawLetterSize ( playerid , Ilosc_Zlecen [ playerid ], 0.212500 , 1.000000 );
PlayerTextDrawTextSize ( playerid , Ilosc_Zlecen [ playerid ], 400.000000 , 17.000000 );
PlayerTextDrawSetOutline ( playerid , Ilosc_Zlecen [ playerid ], 1 );
PlayerTextDrawSetShadow ( playerid , Ilosc_Zlecen [ playerid ], 0 );
PlayerTextDrawAlignment ( playerid , Ilosc_Zlecen [ playerid ], 1 );
PlayerTextDrawColor ( playerid , Ilosc_Zlecen [ playerid ], - 1 );
PlayerTextDrawBackgroundColor ( playerid , Ilosc_Zlecen [ playerid ], 255 );
PlayerTextDrawBoxColor ( playerid , Ilosc_Zlecen [ playerid ], 50 );
PlayerTextDrawUseBox ( playerid , Ilosc_Zlecen [ playerid ], 0 );
PlayerTextDrawSetProportional ( playerid , Ilosc_Zlecen [ playerid ], 1 );
PlayerTextDrawSetSelectable ( playerid , Ilosc_Zlecen [ playerid ], 0 );
return 1 ;
}
w OnPlayerDisconnect
Pawn
PlayerDestroyTD ( playerid )
{
PlayerTextDrawDestroy ( playerid , Ilosc_Zlecen [ playerid ]);
return 1 ;
}
w OnPlayerSpawn
Pawn
PlayerShowTD ( playerid )
{
PlayerTextDrawShow ( playerid , Ilosc_Zlecen [ playerid ]);
return 1 ;
}