Jump to content
  • 0

Sprijin PlayerConnect


w3b

Question

Nick: w3b

Problema: Cum pot face la  if(IsPlayerConnected(playerid)) ceva sa imi arate cand un player s-a conectat la server (w3b s-a conectat la server) sa arate doar adminiilor preferabil sa dea si ip (w3b s-a conectat la server IP .....)

Erori / warnings: nu

Lini/script: if(IsPlayerConnected(playerid))

Ai incercat sa rezolvi singur ?: da

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Tot nu merge , am facut cum mi-ai zis tu dar tot aceeasi eroare imi da..

                       

new string22[128+MAX_PLAYER_NAME];

format(string22, "{C8D4D4}%s s-a conectat la server. %s", GetPlayerNameEx(playerid));

ABroadCast(COLOR_LIGHTRED,string22,1);

ce sa fac ?

Link to comment
Share on other sites

Faci asa frumos.

[pawn]new strname[MAX_PLAYER_NAME], strlogin2[64];

GetPlayerName(playerid, strname, sizeof(strname));

        format(strlogin2, 256, "{C8D4D4}%s s-a conectat la server. %s",strname);

        ABroadCast(COLOR_LIGHTRED,strlogin2,1);[/pawn]

Acum sa-ti explic.

[pawn]strname[MAX_PLAYER_NAME][/pawn]

Variabila speciala pentru nume.

[pawn]GetPlayerName(playerid, strname, sizeof(strname));[/pawn]

Asa formezi numele unui jucator.

Wiki -> http://wiki.sa-mp.com/wiki/GetPlayerName

[pawn]format(strlogin2, 256, "{C8D4D4}%s s-a conectat la server. %s",strname);

        ABroadCast(COLOR_LIGHTRED,strlogin2,1);[/pawn]

Afisezi mesajul.

Link to comment
Share on other sites

Topic inchis , 48h+ fara reply.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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.