Jump to content
  • 0

pomoc (HELP) připojení


Cz_Ritch

Dotaz

jak udelat na server to kdys nejaký hrac příde upozorní to všecny ostatní hrače, např:

Hráč:_______ se připojil, a este, Hráč:________ se odpojil, Buď -(pad hry) nebo -(odešel)

 

dík za rady! :prdel: :klidek:

Link to comment
Share on other sites

12 odpovědí na tuto otázku

Recommended Posts

  • 0

Connect :

public OnPlayerConnect(playerid)
{
new hrac[100];
GetPlayerName(playerid, hrac, 24);
format(hrac, 100, "%s sa pripojil do hry.", hrac);
SendClientMessageToAll(0xA52A2AAA, hrac);
return 1;
}

Disconnect :

public OnPlayerDisconnect(playerid, reason)
{
new hrac[100];
GetPlayerName(playerid, hrac, 30);
switch (reason) {
case 0: format(hrac, 100, "%s Padla  hra  (Timeout)", hrac);
case 1: format(hrac, 100, "%s Odišiel  (Odesel)", hrac);
case 2: format(hrac, 100, "%s Bol zabanovaný (Kick/Ban)", hrac);
}
SendClientMessageToAll(0xA52A2AAA, hrac);
return 1;
}

Link to comment
Share on other sites

  • 0

Radsi te opravim, aby se predeslo erorum

public OnPlayerConnect(playerid)
{
new hrac[100];
GetPlayerName(playerid, hrac, 24);
format(hrac, 100, "%s sa pripojil do hry.", hrac);
SendClientMessageToAll(0xFFFFFFAA, hrac);
}

Link to comment
Share on other sites

  • 0

sry chibi u mne! al eco to je?

C:\Documents and Settings\ll\Plocha\7.9.pwn(196) : error 055: start of function body without function header

C:\Documents and Settings\ll\Plocha\7.9.pwn(197) : error 010: invalid function or declaration

C:\Documents and Settings\ll\Plocha\7.9.pwn(213) : error 055: start of function body without function header

C:\Documents and Settings\ll\Plocha\7.9.pwn(214) : error 010: invalid function or declaration

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

4 Errors.

 

Link to comment
Share on other sites

  • 0

to je to!

 

public OnPlayerConnect(playerid)

{

new hrac[100];

GetPlayerName(playerid, hrac, 24);

format(hrac, 100, "%s se pripojil do krasné hry.", hrac);

SendClientMessageToAll(0xFFFFFFAA, hrac);

}

{

return 1;

}

 

public OnPlayerDisconnect(playerid, reason)

{

new hrac[100];

GetPlayerName(playerid, hrac, 30);

switch (reason) {

case 0: format(hrac, 100, "%s Spadla hra (Timeout)", hrac);

case 1: format(hrac, 100, "%s Odešel (Odesel)", hrac);

case 2: format(hrac, 100, "%s Byl zabanovaný (Kick/Ban)", hrac);

}

SendClientMessageToAll(0xA52A2AAA, hrac);

 

return 1;

}

{

return 1;

}

 

Link to comment
Share on other sites

  • 0
public OnPlayerConnect(playerid)
{
new hrac[100];
GetPlayerName(playerid, hrac, 24);
format(hrac, 100, "%s se pripojil do krasné hry.", hrac);
SendClientMessageToAll(0xFFFFFFAA, hrac);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
new hrac[100];
GetPlayerName(playerid, hrac, 30);
switch (reason) {
case 0: format(hrac, 100, "%s Spadla hra (Timeout)", hrac);
case 1: format(hrac, 100, "%s Odešel (Odesel)", hrac);
case 2: format(hrac, 100, "%s Byl zabanovaný (Kick/Ban)", hrac);
}
SendClientMessageToAll(0xA52A2AAA, hrac);

return 1;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...