[FilterScript] SIMPLE JOIN/QUIT MESSAGE FOR BEGINNER
#1

SIMPLE JOIN/QUIT MESSAGE

Hello! This my first FilterScript, i make a simple join/quit message
This is custom Quit Message with (" Crashed,Quit,Kicked/Banned");
And Join Message.


Code:
 /*
           Thread: https://sampforum.blast.hk/showthread.ph...5.31627613	   SIMPLE JOIN/QUIT MESSAGE
	   By med01
*/

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("*************************************");
	print(" SIMPLE JOIN/QUIT Message By med01");
	print("*************************************");
	return 1;
}

public OnFilterScriptExit()
{
	print(" Unloaded SIMPLE JOIN/QUIT Message By med01");
	return 1;
}
#endif

public OnPlayerConnect(playerid)
{
  new name[MAX_PLAYER_NAME];
  new string[120];
  
  GetPlayerName(playerid,name,sizeof(name));
  format(string,sizeof(string),"%s has Join the server.");
  SendClientMessage(playerid,-1,string);
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new String[64];
    new name[MAX_PLAYER_NAME];

    GetPlayerName(playerid, name, MAX_PLAYER_NAME);

    switch(reason)
    {
        case 0: format(String, sizeof String, "%s left the server. (Crash)", name);
        case 1: format(String, sizeof String, "%s left the server. (Quit)", name);
        case 2: format(String, sizeof String, "%s left the server. (Kicked/Banned)", name);
    }

    SendClientMessageToAll(-1, String);
    return 1;
}
Sorry for my bad English
Reply


Messages In This Thread
SIMPLE JOIN/QUIT MESSAGE FOR BEGINNER - by med01 - 10.12.2013, 18:10
Re: SIMPLE JOIN/QUIT MESSAGE FOR BEGINNER - by Gen3i - 10.12.2013, 18:13
Re: SIMPLE JOIN/QUIT MESSAGE FOR BEGINNER - by Uberanwar - 11.12.2013, 05:46
Re: SIMPLE JOIN/QUIT MESSAGE FOR BEGINNER - by maaz - 11.12.2013, 09:31
Re: SIMPLE JOIN/QUIT MESSAGE FOR BEGINNER - by dugi - 11.12.2013, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)