Jump to content
  • 0

/cops cum?


matrixismyname

Question

Nu stiu daca o sa stie sa faca cineva ceea ce vreau eu insa stiu daor ca e posibil.

As dori sa fac (sau sa ma ajute cineva sa fac) o comanda /cops care sa-mi zica cati cops is online.

Adica.../cops => "There are 3 cops online/onduty"

Eu am deja o comanda /cops dar imi zice doar CINE e online/onduty adica ceva de genu:

/cops => "Lex_Mozli,Tony_Montana are onduty"

Insa eu vreau sa-mi zica in CIFRE/NUMERE cati sunt...stie cineva cum se poate face asta?

ir2tc1.png [url=http://forum.sa-mp.ro/filter-scripts-and-gamemode
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

La inceputul scriptului pune:

new CopsOnline = 0;
pune la comanda /duty on sau cum e:
CopsOnline++;
si la /duty off:
CopsOnline--;
apoi te duci la public OnPlayerDisconnect(playerid) si pui:
if(OnDuty[playerid] == 1) CopsOnline--;
//in cazul in care iese de pe server sau primeste crash sau kick/ban cu duty on Comanda:
if(strcmp(cmd, "/cops", true) == 0)
{
	if(IsPlayerConnected(playerid))
	{
	    new stringco[256];
	    format(stringco, sizeof(stringco), "There are %d cops online/onduty.", CopsOnline);
	    SendClientMessage(playerid, COLOR_ORANGE, stringco);
	}
}

B-Zone: Role Play Server -  77.81.202.202:7777 [url=http://www.game-monitor.com/sa-mp_GameServer/77.

Link to comment
Share on other sites

La inceputul scriptului pune:

new CopsOnline = 0;
pune la comanda /duty on sau cum e:
CopsOnline++;
si la /duty off:
CopsOnline--;
apoi te duci la public OnPlayerDisconnect(playerid) si pui:
if(OnDuty[playerid] == 1) CopsOnline--;
//in cazul in care iese de pe server sau primeste crash sau kick/ban cu duty on Comanda:
if(strcmp(cmd, "/cops", true) == 0)
{
	if(IsPlayerConnected(playerid))
	{
	    new stringco[256];
	    format(stringco, sizeof(stringco), "There are %d cops online/onduty.", CopsOnline);
	    SendClientMessage(playerid, COLOR_ORANGE, stringco);
	}
}

A mers dar nu din prima, ii lipsea ceva la onplayerdeath (sa scada 1cop pt ca automat scadea si duty sau ceva de genul)

Mersi mult, si eu vroiam s-o fac tot la fel asemanatoare insa nu stiam cum sa folosec ++ / --.

ir2tc1.png [url=http://forum.sa-mp.ro/filter-scripts-and-gamemode
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.