![]() |
#1 |
Little Clucker
![]() Join Date: Nov 2012
Location: Born and raised, on a playground is where i spent most of my days
Posts: 37
Reputation: 3
|
![]()
Well this is my first post and i think players may like it, I don't mind if you don't as i'm quite new to coding in "pwn".
Before doing anything. 1)Load Pawno 2)Press CTRL+N 3)Press CTRL+A 4)Press Delete 5)You're ready! Ok so fist you have to define it as a filterscript Code:
#define FILTERSCRIPT //This is a comment, Use it to display the information you need Code:
#include <a_samp> //This includes it into the actual game! Code:
#if defined FILTERSCRIPT Code:
public OnFilterScriptInit() { //Code here Tabbed out to make sure its easily understood return 1; } Code:
public OnFilterScriptInit() { print("\n----------------------------------"); print(" .........:Tutorial's Are Cool As:..........."); print("----------------------------------\n"); return 1; } Code:
public OnFilterScriptExit() { return 1; } Code:
public OnPlayerSpawn(playerid) //This will get there playerid on spawn { SendClientMessage(playerid,colour,"message"); return 1; //Thats the basic, to make it better you can actually add multipul entries } Code:
public OnPlayerSpawn(playerid) { SendClientMessage(playerid,0xFFFFFF,"Welcome, Type /help or /commands for more info!"); return 1; } Code:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/info", cmdtext, true) == 0) { SendClientMessage(playerid,0xFFFFFF,"Creator: Kyle Magix "); //Thats the base example To expand you can have lots of lines. } Code:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/info", cmdtext, true) == 0) { SendClientMessage(playerid,0xFFFFFF,"Creator: Kyle Magix "); SendClientMessage(playerid,0xFFFFFF,"Tested By: You! "); SendClientMessage(playerid,0xFFFFFF,"Use /jobhelp to find out how to get a job "); } } Code:
SendClientMessageToAll(COLORCODE,"TEXT"); Code:
SendClientMessageToAll(0xFF0000,"This is a tutorial and thanks for viewing it"); Code:
#endif Thanks for viewing the tutorial, I hope i helped you. If you have any help you wan't to give me Please post it in the comments, ~Thanks Kyle_Magix(RevolutionLite) |
![]() |
![]() |
![]() |
#2 |
Huge Clucker
![]() ![]() ![]() Join Date: May 2012
Location: Australia
Posts: 223
Reputation: 23
|
![]()
Good work. Keep it up.
|
![]() |
![]() |
![]() |
#3 |
Little Clucker
![]() Join Date: Nov 2012
Location: Born and raised, on a playground is where i spent most of my days
Posts: 37
Reputation: 3
|
![]() |
![]() |
![]() |
![]() |
#4 |
Spam Machine
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Belgium
Posts: 10,089
Reputation: 2655
|
![]()
Sigh, I was already expecting this when I first saw the title of this thread. Contrary to popular belief, this macro is NOT needed to code a filterscript. Some include files may rely on it but basically it can be omitted. Better to start from an empty script and to just add the callbacks that you need.
|
![]() |
![]() |
![]() |
#5 | |
Little Clucker
![]() Join Date: Nov 2012
Location: Born and raised, on a playground is where i spent most of my days
Posts: 37
Reputation: 3
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#6 | |
Little Clucker
![]() Join Date: Nov 2012
Location: Born and raised, on a playground is where i spent most of my days
Posts: 37
Reputation: 3
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 192
Reputation: 140
|
![]()
WHY would you write a tutorial you know NOTHING about? You're not the first, but it seems people care about gaining recognition rather than taking the time to learn something.
|
![]() |
![]() |
![]() |
#8 |
Little Clucker
![]() Join Date: Nov 2012
Location: Born and raised, on a playground is where i spent most of my days
Posts: 37
Reputation: 3
|
![]()
I know how to do this, As this is basic. But the harder stuff is creating a Gamemode and ect, I'm not trying to gain Recognition or anything, I just posted it. Yes i know that i don't know a lot. But i'm willing to learn.
|
![]() |
![]() |
![]() |
#9 |
Huge Clucker
![]() ![]() ![]() Join Date: May 2011
Location: Oulu, Finland
Posts: 339
Reputation: 25
|
![]()
As everyone else already said, this is probably too basic to post. Looking at your signature, i see:
[Tutorial]Basic FilterScript [FilterScript]Basic Help And Join [FilterScript]Clearing Chat [FilterScript]Admin Broadcast Basic filterscript: this one (duh) Basic help and join: probably just sending messages to players when joining and typing /help Clearing chat: probably just spamming the player's chat full of spaces. Admin broadcast: i've seen that one, it's just a command to broadcast stuff to players. The filterscripts are so basic that they should be implemented to a gamemode instead of being a seperate filterscript. There is a maximum of 16 filterscripts to use, and if every function your server has is in a different filterscript you are going to run out of filterscript slots pretty darn soon. I suggest you first learning, and then posting. I spent something like 6 months learning, exploring and googling about scripting, and then i started to take my server seriously. It grew up to a pretty decent server, and once it was up and running at a nice speed i released 2 filterscripts, my in-game map editor and my somewhat useless ratmachines script. My point is: - Learn first, help second - Don't make seperate filterscripts to have your functions in, at least combine them all to make one big filterscript. - Don't let this criticism take you down, you might have talent in scripting, not yet tho. -Jarno |
![]() |
![]() |
![]() |
#10 | |
Little Clucker
![]() Join Date: Nov 2012
Location: Born and raised, on a playground is where i spent most of my days
Posts: 37
Reputation: 3
|
![]() Quote:
-Kyle |
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Tutorial] Basic MySQL Tutorial | Faraday | Help Archive | 43 | 03/06/2011 01:55 PM |
[Tutorial] Simple basic tutorial with name & vehicleid | DarkClone | Tutorials | 11 | 20/03/2011 08:25 AM |
[FilterScript] Basic Registration Filterscript | case 1337: | Filterscripts | 7 | 14/01/2011 11:09 AM |
[FilterScript] [FS]Basic Fuel Filterscript | Pixels^ | Filterscripts | 21 | 08/04/2010 11:00 AM |