[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
#2

Way too easy...

useless.
Reply
#3

You call this snippet a filterscript ?

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

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

This fs helped me ty +rep
Reply
#6

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.
Reply
#7

*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)
Reply
#8

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)
{

}
Reply
#9

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...
Reply
#10

Really really really Easy
#WrongSection
Reply
#11

Our OnGameModeInit in FS LoL!
Reply
#12

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

Any pic ...
Reply
#14

Quote:

Any pic ...?





Click Rep If I helped You
Reply
#15

Let this die...
Reply
#16

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.
Reply
#17

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)