[FilterScript] Welcome&Info [my first fs]
#1

Hello,Today I Created my first fs!
The: Welcome&Info!

I put this in fs that appears when you connect a welcome message and when they appear spawni your information! I inserted a high anti ping created by me, easily xD

Italian:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
#define VERDE 			0x21DD00FF
#define ROSSO           0xE60000FF
////////////////////////////////////////////////////////////////////////////////
#define PING 1500
////////////////////////////////////////////////////////////////////////////////


public OnPlayerConnect(playerid)
{
    if(GetPlayerPing(playerid) > PING)
	{
	 new kick[1000];
     format(kick,sizeof(kick),"[Info:] Sei stato kickato per ping molto alto! il massimo и di %d e tu hai fatto %d",PING,GetPlayerPing(playerid));
     SendClientMessage(playerid,0xFFFFFFAA,kick);
     Kick(playerid);
    }
    new string[64], nomeb[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nomeb,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s и entrato in London City DeathMatch!",nomeb);
    SendClientMessageToAll(VERDE,string);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new
        string[64],
        nomeu[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nomeu,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"%s и uscito da London City DeathMatch!",nomeu);
        case 1: format(string,sizeof string,"%s и uscito da London City DeathMatch!",nomeu);
        case 2: format(string,sizeof string,"%s и uscito da London City DeathMatch! [kickato/bannato]",nomeu);
    }
    SendClientMessageToAll(ROSSO,string);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new informazioni[1000];
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof (nome));
    format(informazioni,sizeof(informazioni),"[Info:] Benvenuto %s! Hai: %d punti - %d$ - sei id %d",nome,GetPlayerScore(playerid),GetPlayerMoney(playerid),playerid);
    SendClientMessage(playerid,0xFFFFFFAA,informazioni);
	return 1;
}
English:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
#define VERDE 			0x21DD00FF
#define ROSSO           0xE60000FF
////////////////////////////////////////////////////////////////////////////////
#define PING 1500
////////////////////////////////////////////////////////////////////////////////


public OnPlayerConnect(playerid)
{
    if(GetPlayerPing(playerid) > PING)
	{
	 new kick[1000];
     format(kick,sizeof(kick),"[Info:] You are kicked for high ping [%d] your ping is %d",PING,GetPlayerPing(playerid));
     SendClientMessage(playerid,0xFFFFFFAA,kick);
     Kick(playerid);
    }
    new string[64], nomeb[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nomeb,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s are logged in on London City Deathmatch!",nomeb);
    SendClientMessageToAll(VERDE,string);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new
        string[64],
        nomeu[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nomeu,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"%s are slogged by London City Deathmatch!",nomeu);
        case 1: format(string,sizeof string,"%s are slogged by London City Deathmatch!",nomeu);
        case 2: format(string,sizeof string,"%s are slogged by London City Deathmatch! [kicked/banned]",nomeu);
    }
    SendClientMessageToAll(ROSSO,string);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new informazioni[1000];
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof (nome));
    format(informazioni,sizeof(informazioni),"[Info:] Welcome %s! You Have: %d points - %d$ - your level is %d",nome,GetPlayerScore(playerid),GetPlayerMoney(playerid),playerid);
    SendClientMessage(playerid,0xFFFFFFAA,informazioni);
	return 1;
}
Bye and sorry for my bad english!
Reply


Messages In This Thread
Welcome&Info [my first fs] - by Christian7073 - 07.05.2013, 15:02
Re: Welcome&Info [my first fs] - by SampN - 07.05.2013, 15:29
Re: Welcome&Info [my first fs] - by Christian7073 - 07.05.2013, 15:29
Re: Welcome&Info [my first fs] - by Lordzy - 07.05.2013, 15:40
Re: Welcome&Info [my first fs] - by Mark_Samp - 07.05.2013, 15:56
Re: Welcome&Info [my first fs] - by Christian7073 - 07.05.2013, 15:58
Re: Welcome&Info [my first fs] - by Deathlane - 08.05.2013, 08:41

Forum Jump:


Users browsing this thread: 1 Guest(s)