19.12.2013, 12:24
Simple Join Message
Well i know this is a small thing. but handy sometimes. It says like [playername] has joined the server!well here is the code
Код:
#include <a_samp> public OnPlayerConnect(playerid) { new string[64], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"%s has joined Your Server Name Here!",pName); SendClientMessageToAll(0xFFFFFFAA,string); return 1; } public OnPlayerDisconnect(playerid, reason) { new szString[64], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); switch(reason) { case 0: format(szString, sizeof szString, "%s left Your Server Name Here. (Timed Out/Crashed)", name); case 1: format(szString, sizeof szString, "%s left Your Server Name Here. (Quit)", name); case 2: format(szString, sizeof szString, "%s left Your Server Name Here. (Kicked/Banned)", name); } SendClientMessageToAll(0xC4C4C4FF, szString); return 1;