SA-MP Forums Archive
[FilterScript] Connect Rules - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Connect Rules (/showthread.php?tid=367323)



Connect Rules - xSkullx - 09.08.2012

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.


Re: Connect Rules - Shetch - 09.08.2012

Way too easy...

useless.


Re: Connect Rules - PawnFox - 09.08.2012

You call this snippet a filterscript ?

This is useless .. srsly, i mean everyone can make a dialog ...


Re: Connect Rules - xSkullx - 10.08.2012

I know but some newbies looking for it or don't know to make it.
Code:
Work Time:
 5 mins



Re: Connect Rules - P<3TS - 10.08.2012

This fs helped me ty +rep


Re: Connect Rules - Sinner - 10.08.2012

pawn Code:
new C_Rules;
if(dialogid == C_Rules)
{
...
Wtf? You clearly have no idea what you're doing. This will not work if you have other dialogs.


Re: Connect Rules - xSkullx - 10.08.2012

*facepalm*
For me it's working and for P<3TS too. so..

And it is like this not like yours:
Code:
new C_Rules;
if(dialogid == C_Rules)
{
	    if(response)



Re: Connect Rules - Shetch - 10.08.2012

Quote:
Originally Posted by xSkullx
View Post
*facepalm*
For me it's working and for P<3TS too. so..
Facepalm yourself, kind sir because you obviously do not know shit about creating dialogs.
Sinner is right, that is not the correct way of doing it, this is:

Code:
#define DIALOG_RULES 0

if(diealogid == DIALOG_RULES)
{

}



Re: Connect Rules - XStormiest - 10.08.2012

too easy ...........but good for newbies...
Gj
and you wrong something , try making instead new C_Rules;
#define C_Rules 20
//for example...
because C_Rules is created but have not value = 0 so if someone have a another dialog with id 0 , will be a problem...


Re: Connect Rules - Dolf - 10.08.2012

Really really really Easy
#WrongSection


Re: Connect Rules - Don_Speed - 10.08.2012

Our OnGameModeInit in FS LoL!


Re: Connect Rules - CaptainMactavish - 26.09.2012

Bad usage of dialogs and variables. I don't recommend to use this seriously.


Re: Connect Rules - M3mPHi$_S3 - 27.09.2012

Any pic ...


Re: Connect Rules - Patrick - 27.09.2012

Quote:

Any pic ...?





Click Rep If I helped You


Re: Connect Rules - xSkullx - 27.09.2012

Let this die...


Re: Connect Rules - supernerd2000 - 17.04.2016

Quote:
Код:
	SendClientMessage(playerid,0xFF0000FF,"You have been kicked because you don't accept our rules !");
	Kick(playerid);
This won't work either. You need a delay in between the message and kick, or the player will not see the message.

Also, the issues others mentioned. Definitely would not recommend using this.


Re: Connect Rules - Crystallize - 17.04.2016

Quote:
Originally Posted by supernerd2000
Посмотреть сообщение
This won't work either. You need a delay in between the message and kick, or the player will not see the message.

Also, the issues others mentioned. Definitely would not recommend using this.
It's a 2012 thread , why the hell in the world would you bump this
Attention whore.