[FilterScript] Connect Rules
#1

I know it's very sample, but i think somebody looking for it or don't know to make it.

Informations:
When you connect apears a dialog with the rules wich you can change, and if the player click on accept it will say
Code:
You accepted the rules !
If he click on Don't accept will kick the player and will say
Code:
You didn't accept the rules and you have been kicked !
Credits:
RaZzZzoR(me)

Work Time:
5 mins )

Download:
Code:
//Connect Rules By RaZzZzoR
//I know, it's sample, but some people's looking for it or don't know to make it , so i was make it.
//I know , you will remove the credits and say it's made by you, but that's the people from today.
#include <a_samp>
#if defined FILTERSCRIPT
#define C_Rules

#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_RED 0xFF0000FF
#pragma tabsize 0

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("Connect Rules By RaZzZzoR - Loaded      ");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Connect Rules ---- Un-LOADED !!    ");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	new C_Rules;
	new BigString[1900];
	strcat(BigString, "\n", 1900 );//Here you can add the rules !
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	strcat(BigString, "\n", 1900 );
	ShowPlayerDialog(playerid,C_Rules, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Don't Accept");
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new C_Rules;
if(dialogid == C_Rules)
{
	    if(response)
	{
	SendClientMessage(playerid,0xFFFFFFFF,"You accepted the rules!");
	}
		else
    {
	SendClientMessage(playerid,0xFF0000FF,"You have been kicked because you don't accept our rules !");
	Kick(playerid);
	}
		return 1;
}
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
I don't aspect at notes bigger than 3 but i'm happy 'cuz i probably helped someone.
Reply


Messages In This Thread
Connect Rules - by xSkullx - 09.08.2012, 16:20
Re: Connect Rules - by Shetch - 09.08.2012, 16:50
Re: Connect Rules - by PawnFox - 09.08.2012, 17:31
Re: Connect Rules - by xSkullx - 10.08.2012, 11:18
Re: Connect Rules - by P<3TS - 10.08.2012, 11:35
Re: Connect Rules - by Sinner - 10.08.2012, 12:54
Re: Connect Rules - by xSkullx - 10.08.2012, 13:03
Re: Connect Rules - by Shetch - 10.08.2012, 13:20
Re: Connect Rules - by XStormiest - 10.08.2012, 13:24
Re: Connect Rules - by Dolf - 10.08.2012, 16:01
Re: Connect Rules - by Don_Speed - 10.08.2012, 17:04
Re: Connect Rules - by CaptainMactavish - 26.09.2012, 23:45
Re: Connect Rules - by M3mPHi$_S3 - 27.09.2012, 14:44
Re: Connect Rules - by Patrick - 27.09.2012, 14:56
Re: Connect Rules - by xSkullx - 27.09.2012, 15:25
Re: Connect Rules - by supernerd2000 - 17.04.2016, 13:51
Re: Connect Rules - by Crystallize - 17.04.2016, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)