#include // This is a comment // uncomment the line below if you want to write a filterscript #define FILTERSCRIPT #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Join and Leave server messages: LOADED"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { print("\n--------------------------------------"); print(" Join and Leave server messages: UNLOADED"); print("--------------------------------------\n"); return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif PlayerName(playerid) { new pName[24]; GetPlayerName(playerid, pName, 24); return pName; } public OnPlayerConnect(playerid) { new str[256]; format(str, sizeof str, "SERVER: %s has joined the server", PlayerName(playerid)); SendClientMessageToAll(0xFFFFFFFF, str); printf(" %s has joind the server", PlayerName(playerid)); return 1; } public OnPlayerDisconnect(playerid, reason) { new str[256]; format(str, sizeof str, "SERVER: %s has left the server", PlayerName(playerid)); SendClientMessageToAll(0xFFFFFFFF, str); printf(" %s has left the server", PlayerName(playerid)); return 1; }