Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new cvar;
- new Text:jatekosok;
- forward PlayerFrissito(playerid);
- public OnFilterScriptInit()
- {
- SetTimer("PlayerFrissito", 2000,true);
- jatekosok = TextDrawCreate(555.000000, 99.000000, "1/50");
- TextDrawBackgroundColor(jatekosok, 255);
- TextDrawFont(jatekosok, 3);
- TextDrawLetterSize(jatekosok, 0.539999, 1.500000);
- TextDrawColor(jatekosok, -1);
- TextDrawSetOutline(jatekosok, 1);
- TextDrawSetProportional(jatekosok, 1);
- for(new i; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawShowForPlayer(i, jatekosok);
- }
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawHideForAll(jatekosok);
- TextDrawDestroy(jatekosok);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- cvar++;
- TextDrawShowForPlayer(playerid, jatekosok);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- cvar--;
- TextDrawHideForPlayer(playerid, jatekosok);
- return 1;
- }
- public PlayerFrissito(playerid)
- {
- new string[16];
- format(string, sizeof string, "%i/50", cvar);
- TextDrawSetString(jatekosok, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment