public OnPlayerConnect(playerid){new pName[MAX_PLAYER_NAME];new string[48];GetPlayerName(playerid, pName, sizeof(pName));format(string, sizeof(string), \"%s csatlakozott a szerverre\", pName);SendClientMessageToAll(0xAAAAAAAA, string);return 1;}public OnPlayerDisconnect(playerid, reason){new pName[MAX_PLAYER_NAME];new string[56];GetPlayerName(playerid, pName, sizeof(pName));switch(reason){case 0: format(string, sizeof(string), \"%s kilépett a serverrõl. (Timeout/kifagyott)\", pName);case 1: format(string, sizeof(string), \"%s kilépett a serverrõl. (Kilépett)\", pName);case 2: format(string, sizeof(string), \"%s kilépett a serverrõl. (Kick/ban)\", pName);}SendClientMessageToAll(0xAAAAAAAA, string);return 1;}
public OnPlayerConnect(playerid){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount += 1; }}new pName[MAX_PLAYER_NAME];new string[48];GetPlayerName(playerid, pName, sizeof(pName));format(string, sizeof(string), \"%s csatlakozott a szerverre (%d/%d)\", pName, GetMaxPlayers(),PlayerCount);SendClientMessageToAll(0xAAAAAAAA, string);return 1;}
public OnPlayerConnect(playerid){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount += 1; }}new pName[MAX_PLAYER_NAME];new string[48];GetPlayerName(playerid, pName, sizeof(pName));format(string, sizeof(string), \"%s(%s) csatlakozott a szerverre (%d/%d)\", pName,playerid,GetMaxPlayers(),PlayerCount);SendClientMessageToAll(0xAAAAAAAA, string);return 1;}public OnPlayerDisconnect(playerid, reason){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount += 1; }}new pName[MAX_PLAYER_NAME];new string[56];GetPlayerName(playerid, pName, sizeof(pName));switch(reason){case 0: format(string, sizeof(string), \"%s(%s) kilépett a serverrõl.(%d/%d) (Timeout/kifagyott)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 1: format(string, sizeof(string), \"%s(%s) kilépett a serverrõl.(%d/%d) (Kilépett)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 2: format(string, sizeof(string), \"%s(%s) kilépett a serverrõl.(%d/%d) (Kick/ban)\", pName,playerid,GetMaxPlayers(),PlayerCount);}SendClientMessageToAll(0xAAAAAAAA, string);return 1;}
public OnPlayerConnect(playerid){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount ++; }}new pName[MAX_PLAYER_NAME];new string[48];GetPlayerName(playerid, pName, sizeof(pName));format(string, sizeof(string), \"%s(%i) csatlakozott a szerverre (%d/%d)\", pName,playerid,GetMaxPlayers(),PlayerCount);SendClientMessageToAll(0xAAAAAAAA, string);return 1;}public OnPlayerDisconnect(playerid, reason){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount --; }}new pName[MAX_PLAYER_NAME];new string[56];GetPlayerName(playerid, pName, sizeof(pName));switch(reason){case 0: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Timeout/kifagyott)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 1: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Kilépett)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 2: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Kick/ban)\", pName,playerid,GetMaxPlayers(),PlayerCount);}SendClientMessageToAll(0xAAAAAAAA, string);return 1;}
Jav.: public OnPlayerConnect(playerid){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount ++; }}new pName[MAX_PLAYER_NAME];new string[48];GetPlayerName(playerid, pName, sizeof(pName));format(string, sizeof(string), \"%s(%i) csatlakozott a szerverre (%d/%d)\", pName,playerid,GetMaxPlayers(),PlayerCount);SendClientMessageToAll(0xAAAAAAAA, string);return 1;}public OnPlayerDisconnect(playerid, reason){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount --; }}new pName[MAX_PLAYER_NAME];new string[56];GetPlayerName(playerid, pName, sizeof(pName));switch(reason){case 0: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Timeout/kifagyott)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 1: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Kilépett)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 2: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Kick/ban)\", pName,playerid,GetMaxPlayers(),PlayerCount);}SendClientMessageToAll(0xAAAAAAAA, string);return 1;}
#include a_sampnewplayers,string[512];public OnPlayerConnect(playerid) {players ++;format(string, sizeof(string), \"%s(%i) csatlakozott a szerverhez! [%i/%i]\", Name(playerid), playerid, players, GetMaxPlayers());SendClientMessageToAll(-1, string);return 1;}public OnPlayerDisconnect(playerid, reason) {players --;format(string, sizeof(string), \"%s(%i) kilépett a szerverrõl! [%i/%i]\", Name(playerid), playerid, players, GetMaxPlayers());SendClientMessageToAll(-1, string);return 1;}Name(playerid) {new n[24];GetPlayerName(playerid, n, 24);return n;}
Jav.: public OnPlayerConnect(playerid){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount ++; }}new pName[MAX_PLAYER_NAME];new string[48];GetPlayerName(playerid, pName, sizeof(pName));format(string, sizeof(string), \"%s(%i) csatlakozott a szerverre (%d/%d)\", pName,playerid,GetMaxPlayers(),PlayerCount);SendClientMessageToAll(0xAAAAAAAA, string);return 1;}public OnPlayerDisconnect(playerid, reason){new PlayerCount;for(new i,a = GetMaxPlayers();i < a;i++){ if(IsPlayerConnected(i)) { PlayerCount --; }}new pName[MAX_PLAYER_NAME];new string[56];GetPlayerName(playerid, pName, sizeof(pName));switch(reason){case 0: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Timeout/kifagyott)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 1: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Kilépett)\", pName,playerid,GetMaxPlayers(),PlayerCount);case 2: format(string, sizeof(string), \"%s(%i) kilépett a serverrõl.(%d/%d) (Kick/ban)\", pName,playerid,GetMaxPlayers(),PlayerCount);}SendClientMessageToAll(0xAAAAAAAA, string);return 1;} Elég fura megoldás.. itt egy egyszerûbb.. #include a_sampnewplayers,string[512];public OnPlayerConnect(playerid) {players ++;format(string, sizeof(string), \"%s(%i) csatlakozott a szerverhez! [%i/%i]\", Name(playerid), playerid, players, GetMaxPlayers());SendClientMessageToAll(-1, string);return 1;}public OnPlayerDisconnect(playerid, reason) {players --;format(string, sizeof(string), \"%s(%i) kilépett a szerverrõl! [%i/%i]\", Name(playerid), playerid, players, GetMaxPlayers());SendClientMessageToAll(-1, string);return 1;}Name(playerid) {new n[24];GetPlayerName(playerid, n, 24);return n;} [/quote]Az elõbbi kódot csak javítottam, ne nekem írd..