Jednostavan brojač online igrača

Započeo Łuk@
15. Okt. 2017. Zaključano
4,781
pregleda
29
postova
ophion
5
OG Legend
15. Okt. 2017.
Tip: FS/Inc/IS
Slike ili Video: //
Opis i dodatne informacije: Kad pogledate kod, nije potreban nikakav tajmer, samo varijabla, sve je testirano i radi bez greške.
Download link:
//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

#include     "a_samp"
#include     "fixes"

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

main()
print("\nScript loaded\n");

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

new onlineigraca = 0,
Text:TEXT;

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

public OnGameModeInit()
{
TEXT = TextDrawCreate(89.555526, 428.435546, "ONLINE_0");
TextDrawLetterSize(TEXT, 0.237777, 1.161954);
TextDrawAlignment(TEXT, 2);
TextDrawColor(TEXT, -1);
TextDrawSetShadow(TEXT, 0);
TextDrawSetOutline(TEXT, 1);
TextDrawBackgroundColor(TEXT, 255);
TextDrawFont(TEXT, 2);
TextDrawSetProportional(TEXT, 1);
TextDrawSetShadow(TEXT, 0);
return 1;
}

public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, TEXT);
onlineigraca++;
static string;
format(string, sizeof(string), "ONLINE %d", onlineigraca);
TextDrawSetString(TEXT, string);
printf("TRENUTNO ONLINE - %d",onlineigraca);
return 1;
}

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

public OnPlayerDisconnect(playerid, reason)
{
onlineigraca--;
static string;
format(string, sizeof(string), "TRENUTNO ONLINE - %d", onlineigraca);
TextDrawSetString(TEXT, string);
printf("a %d",onlineigraca);
return 1;
}

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

public OnGameModeExit()
{
TextDrawDestroy(TEXT);
return 1;
}

Credits: Sjetio sam se da sam Corr***ja pitao prije godinu-dvije, pa se sad sjetio toga
Edo Castelllano
5
Board Moderator
15. Okt. 2017.
Svidja mi se brt 😄
Bolex_
4
Made Man
15. Okt. 2017.
A što ako uvezem NPC-a, i tada će mi brojati kao x/x online. Sredi to.
TerzaScripting
5
Underboss
15. Okt. 2017.
Bolex_ wrote on October 15, 2017, 11:05 am:
A što ako uvezem NPC-a, i tada će mi brojati kao x/x online. Sredi to.

Eto i to
if(!IsPlayerNPC(playerid))
ophion
5
OG Legend
15. Okt. 2017.
Bolex_ wrote on October 15, 2017, 11:05 am:
A što ako uvezem NPC-a, i tada će mi brojati kao x/x online. Sredi to.
Eto ga hehe
//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

#include     "a_samp"
#include     "fixes"

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

main()
print("\nScript loaded\n");

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

new onlineigraca = 0,
Text:TEXT;

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

public OnGameModeInit()
{
TEXT = TextDrawCreate(89.555526, 428.435546, "ONLINE_0");
TextDrawLetterSize(TEXT, 0.237777, 1.161954);
TextDrawAlignment(TEXT, 2);
TextDrawColor(TEXT, -1);
TextDrawSetShadow(TEXT, 0);
TextDrawSetOutline(TEXT, 1);
TextDrawBackgroundColor(TEXT, 255);
TextDrawFont(TEXT, 2);
TextDrawSetProportional(TEXT, 1);
TextDrawSetShadow(TEXT, 0);
printf("a %d",onlineigraca);
return 1;
}

public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
TextDrawShowForPlayer(playerid, TEXT);
onlineigraca++;
static string;
format(string, sizeof(string), "ONLINE %d", onlineigraca);
TextDrawSetString(TEXT, string);
printf("TRENUTNO ONLINE - %d",onlineigraca);
}
return 1;
}

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

public OnPlayerDisconnect(playerid, reason)
{
onlineigraca--;
static string;
format(string, sizeof(string), "TRENUTNO ONLINE - %d", onlineigraca);
TextDrawSetString(TEXT, string);
printf("a %d",onlineigraca);
return 1;
}

//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~//~~

public OnGameModeExit()
{
TextDrawDestroy(TEXT);
return 1;
}


Tᴇʀᴢɪᴄ Sᴄʀɪᴘᴛ wrote on October 15, 2017, 11:05 am:
A što ako uvezem NPC-a, i tada će mi brojati kao x/x online. Sredi to.

Eto i to
if(!IsPlayerNPC(playerid))

ma znam sam
nickydefacto
4
Made Man
15. Okt. 2017.
Svaka ti dala  😁 😁
ophion
5
OG Legend
15. Okt. 2017.
Nijaz Selimovic wrote on October 15, 2017, 11:23 am:
Svaka ti dala  😁 😁
p**** i a****, jk, ty
AhmAA
8
Super Moderator
🔥62
15. Okt. 2017.
Jako dobro!

daddyDOT

Balkan SA:MP Super moderator


Balkan SA:MP

Balkan SA:MP - since 2009

ophion
5
OG Legend
15. Okt. 2017.
#AhmAA wrote on October 15, 2017, 2:57 pm:
Jako dobro!
hvala 😄

ae replyajte
ophion
5
OG Legend
17. Okt. 2017.
bump
RahimPAWNO
5
OG Legend
17. Okt. 2017.
Pohvale za trud.
ophion
5
OG Legend
17. Okt. 2017.
bump
cutura
5
Godfather
17. Okt. 2017.
posluzit ce 😄
ophion
5
OG Legend
17. Okt. 2017.
Stifler ツ wrote on October 17, 2017, 8:18 pm:
posluzit ce 😄
logicno, bolje ovo nego tajmer
Muma Rascall
6
Forum Don
17. Okt. 2017.
Ukr'o!!!

Å ala 😄 pomoći će nekom sigurno. 🙂

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha