Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************
- *
- * Start Script
- *
- ******************/
- #include <sourcemod>
- #include <morecolors>
- #include <geoip>
- #define NAME "Connect Message"
- #define PLUGIN_VERSION "1.0"
- #define AUTHOR ""
- #define DESCRIPTION "Plugin de connexion/déconnexion"
- public Plugin:myinfo =
- {
- name = NAME,
- description = DESCRIPTION,
- author = AUTHOR,
- version = PLUGIN_VERSION
- };
- #define Prefix "{white}[Ba_Jail] {blue}:"
- public OnPluginStart()
- {
- HookEvent("player_disconnect", OnPlayerDisconnect, EventHookMode_Pre);
- }
- /******************
- *
- * Connexion
- *
- ******************/
- public OnClientPutInServer(client)
- {
- new String:SteamID[64];
- new String:ip[32];
- new String:Pays[46];
- GetClientAuthString(client, SteamID, sizeof(SteamID));
- GetClientIP(client, ip, 19);
- GeoipCountry(ip, Pays, sizeof(Pays));
- if(ADMIN(client))
- {
- CPrintToChatAll("%s {gold}%N {blue}vient de se {green}connecter{blue}. {orangered}[%s] {aqua}(%s)", Prefix, client, SteamID, Pays);
- CPrintToChatAll("%s {red}Freekilleurs / freekillers gares à vos fesses un Admin vient de se connecter.", Prefix, client, SteamID, Pays);
- CPrintToChat(client, "%s Vous venez de vous connecter au serveur {white}Ba_Jail{blue}.", Prefix);
- }
- if(STAFF(client))
- {
- CPrintToChatAll("%s {gold}%N {blue}vient de se {green}connecter{blue}. {orangered}[%s] {aqua}(%s)", Prefix, client, SteamID, Pays);
- CPrintToChatAll("%s {red}Mettez-vous tous à genoux un dieu de la team vient de se connecter.", Prefix, client, SteamID, Pays);
- CPrintToChat(client, "%s Vous venez de vous connecter au serveur {white}Ba_Jail{blue}.", Prefix);
- }
- if(VIP(client))
- {
- CPrintToChatAll("%s {gold}%N {blue}vient de se {green}connecter{blue}. {orangered}[%s] {aqua}(%s)", Prefix, client, SteamID, Pays);
- CPrintToChatAll("%s {red}Preparez-vous un PGM arrive dans la game.", Prefix, client, SteamID, Pays);
- CPrintToChat(client, "%s Vous venez de vous connecter au serveur {white}Ba_Jail{blue}.", Prefix);
- }
- else
- {
- CPrintToChatAll("%s {gold}%N {blue}vient de se {green}connecter{blue}. {orangered}[%s] {aqua}(%s)", Prefix, client, SteamID, Pays);
- CPrintToChat(client, "%s Vous venez de vous connecter au serveur {white}Ba_Jail{blue}.", Prefix);
- }
- }
- /******************
- *
- * Déconnexion
- *
- ******************/
- public Action:OnPlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast)
- {
- if (!dontBroadcast)
- {
- new client = GetClientOfUserId(GetEventInt(event, "userid"));
- new String:SteamID[64];
- new String:ip[32];
- new String:Pays[46];
- GetClientAuthString(client, SteamID, sizeof(SteamID));
- GetClientIP(client, ip, 19);
- GeoipCountry(ip, Pays, sizeof(Pays));
- if(ADMIN(client))
- {
- CPrintToChatAll("%s {red}Freekilleurs / freekillers gares à vos fesses un Admin vient de se déconnecter.", Prefix, client, SteamID, Pays);
- }
- if(STAFF(client))
- {
- CPrintToChatAll("%s {red}Mettez-vous tous à genoux un dieu de la team vient de se déconnecter.", Prefix, client, SteamID, Pays);
- }
- if(VIP(client))
- {
- CPrintToChatAll("%s {red}Un PGM quitte la game.", Prefix, client, SteamID, Pays);
- }
- else
- {
- CPrintToChatAll("%s %N vient de se déconnecter.", Prefix, client, SteamID, Pays);
- }
- }
- return Plugin_Continue;
- }
- public STAFF(client)
- {
- if (GetUserFlagBits(client) & ADMFLAG_ROOT) return true;
- else return false;
- }
- public ADMIN(client)
- {
- if (GetUserFlagBits(client) & ADMFLAG_BAN) return true;
- else return false;
- }
- public VIP(client)
- {
- if (GetUserFlagBits(client) & ADMFLAG_CUSTOM4) return true;
- else return false;
- }
- /******************
- *
- * End Script
- *
- ******************/
Add Comment
Please, Sign In to add comment