Jump to content
  • 0

Question

Posted

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

11 answers to this question

Recommended Posts

Posted

Am facut asa :

{

  new string22[900+MAX_PLAYER_NAME];

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

ABroadCast(COLOR_LIGHTRED,string22,1);

}

E bine ?

  • Administrator
Posted

Nu, de ce ai acolo new string[900+]? Pune 128 ca nu folosesti mai mult.

Posted

Nu merge , dupa compile da eroare

error 035Largument type mismatch (argument 2)

Imi pot face tu una buna ? :D

  • Administrator
Posted

Nu.

Vezi ca la GetPlayerNameEx trebuie sa fie si cu (playerid). Asa presimt.

Posted

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 ?

Posted

forward ABroadCast(color,const string[],level);

de la GetPlayerNameEx nu am gasit.. :|

erroare este : error 035Largument type mismatch (argument 2)

  • Administrator
Posted

Vezi ca de la GetPlayername ... e. Uita-te aici cum sa faci.

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

Posted

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.

Posted

Topic inchis , 48h+ fara reply.

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

 

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.