25.02.2014, 08:44
Quote:
You need to move the whole OnPlayerConnect section to OnGameModeInit.
Cheers. |
I don't understand what you're doing though, and I'm wondering why it doesn't show any errors/warnings.
because of this:
Creation of a PLAYER textdraw;
pawn Код:
Textdraw20[i] = CreatePlayerTextDraw(i, 37.999977, 431.573272, "");
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw20[playerid]);
PlayerTextDrawShow.
https://sampwiki.blast.hk/wiki/PlayerTextDrawShow
the way you do it, it should give some tag mismatch warnings if I'm right.
same goes for OnPlayerUpdate
pawn Код:
TextDrawSetString(Textdraw20[i], PInfo[playerid][Kills]);
https://sampwiki.blast.hk/wiki/PlayerTextDrawSetString
also don't use loops in OnPlayerConnect/OnPlayerSpawn/OnPlayerUpdate as it has a playerid parameter already.
this is how you should do it:
pawn Код:
// Create Playertextdraws here( new PlayerText:yourtext; );
OnPlayerConnect // create them here with yourtext = CreatePlayerTextDraw;
OnPlayerSpawn // Show them here with PlayerTextDrawShow;
OnPlayerUpdate // update them here with PlayerTextDrawSetString
pawn Код:
PlayerTextDrawSetString( .... );
PlayerTextDrawShow( .... );