SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 15/08/2009, 06:51 AM   #1
acok97
Little Clucker
 
Join Date: Aug 2009
Posts: 13
Reputation: 0
Default How to add rules?

OK , Thanks people for the anims , now I want to add rules, could somebody teach me how to do that ?
acok97 is offline  
Old 15/08/2009, 07:00 AM   #2
Abernethy
Gangsta
 
Join Date: May 2009
Posts: 898
Reputation: -1
Default Re: How to add rules?

Extremely Simple piece of code.
pawn Code:
SendClientMessage(playerid, YOUR_COLOR, "The message you want to display goes here!");
Abernethy is offline  
Old 15/08/2009, 07:01 AM   #3
Adil
Gangsta
 
Adil's Avatar
 
Join Date: Aug 2008
Posts: 860
Reputation: 20
Default Re: How to add rules?

You should tell us how you want your rules to show up ? when they connect ? or when they spawn ? or when they /register ? please provide us with some description before asking.

Regards, Adil.
__________________
Signature

My Works
[NPC]LS Bus System
[MAP]Mansion

Adil is offline  
Old 15/08/2009, 07:24 AM   #4
acok97
Little Clucker
 
Join Date: Aug 2009
Posts: 13
Reputation: 0
Default Re: How to add rules?

I want it when they spawn @ Pakistan Cool Boy
PS. If it could to freeze everything , so when you spawn it freezes and then the rules show up
acok97 is offline  
Old 13/05/2011, 03:16 PM   #5
Naruto_Emilio
Banned
 
Join Date: Apr 2011
Location: North Africa
Posts: 1,297
Reputation: 365
Default Re : How to add rules?

Then put the code under, OnPlayerSpawn
pawn Code:
SendClientMessage(playerid, AEB404, "Rule Number1");
SendClientMessage(playerid, AEB404, "Rule Number2");
SendClientMessage(playerid, AEB404, "Rule Number3");
SendClientMessage(playerid, AEB404, "Rule Number4");
SendClientMessage(playerid, AEB404, "Rule Number5");
Naruto_Emilio is offline  
Old 13/05/2011, 03:23 PM   #6
Biesmen
High-roller
 
Biesmen's Avatar
 
Join Date: May 2009
Posts: 1,058
Reputation: 665
Default Re: How to add rules?

Or, more efficient:
pawn Code:
public OnPlayerSpawn(playerid)
{
   TogglePlayerControllable(playerid, false);
   ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Rules here", "Understood", "Cancel");
   return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == 1)
   {
      if(!response) // If he clicked on "Cancel"
      {
         Kick(playerid); // It will kick him
         return 1;
      } else {
         TogglePlayerControllable(playerid, true);
      }
      return 1;
   }
   return 0;
}
Biesmen is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Simple rules allarw Filterscripts 32 21/06/2011 08:37 PM
server rules DeadlyBoy Help Archive 10 24/06/2010 09:14 PM
Custom rules westre Server Support 4 23/03/2010 06:33 PM
Rules MulTsafe Client Support 5 20/09/2009 11:33 PM


All times are GMT. The time now is 07:06 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.