free

News

collapse

User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

Re: The Soprano Family | Royal Loyalty by Dean.
[August 03, 2025, 11:23:58 pm]


Re: Rest in peace by Dean.
[August 03, 2025, 11:23:30 pm]


Re: Stopping by by Dean.
[August 03, 2025, 11:22:35 pm]


Re: ordinary day in VCMP by Denlow
[July 28, 2025, 04:58:56 pm]


Re: The Soprano Family | Royal Loyalty by .Mario.
[July 26, 2025, 03:05:43 pm]


Re: [SA:MP]House of Sforza | The Elite Power | Estd. 2006 | LS - LV by FrankCivello
[July 17, 2025, 12:50:43 am]


NOTICE OF PARKING ENFORCEMENT CHANGES by Huntsman
[June 19, 2025, 05:22:50 pm]


Re: Stopping by by Sinister
[June 08, 2025, 01:58:04 pm]


Re: Stopping by by Ehks
[June 04, 2025, 12:25:17 am]


Re: Rest in peace by Stefanrsb
[June 02, 2025, 03:38:02 am]


Re: [SA:MP]House of Sforza | The Elite Power | Estd. 2006 | LS - LV by Stefanrsb
[June 02, 2025, 03:09:22 am]


Re: The Soprano Family | Royal Loyalty by Stefanrsb
[June 02, 2025, 03:00:31 am]

* Who's Online

  • Dot Guests: 353
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Birthday Calender

August 2025
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 [14] 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

Question about scripters

PSVITA · 1693

0 Members and 1 Guest are viewing this topic.

Offline Ted

  • SA:MP Valar
  • ***
    • Posts: 4871
    With us since: 13/05/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #15 on: July 13, 2012, 06:41:04 pm
My own tip would be not to learn from large scripts, especially old ones, as they will be very confusing for a first timer. Old scripts of course will use old/slow methods. You would not want pick up others habits either.

If you were post this question on the SA-MP forum, I can guarantee they would suggest you to download a heavily edited script, usually one stemming from Pen1 for example Godfather. These are too old especially Pen1 which is still available that takes a lot of work to get running and then to continue fixing.

Also worth a mention both of those have a serious login bug.



Offline Conroy

  • Hero
  • ****
    • Posts: 2140
    With us since: 03/10/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #16 on: July 13, 2012, 07:22:21 pm
You must also be interested in sheep to become an Argonath scripter, especially for SA:MP :rofl:

As for how I learned scripting...
I've always been interested in computers since I was little, and when I got into secondary school, my computing teacher taught the class how to do basic HTML and I found it fascinating that what I type can be displayed on a web page
I think I was the only person who enjoyed it, I was the nerd of the class
Anyway, we moved onto programming in Visual Basic, it was a lot harder than making web pages but I found it more enjoyable
Although a programmer shouldn't compare programming to web development, I feel web development is limited to the browsers capabilities, whereas programming with Visual Basic or other languages is limited to the operating system
Anyway, we continued Visual Basic and I started learning more and more, starting with the classical "Hello world!" to being able to validate user inputs

At my last year of high school, my class got mixed with the year below us because there wasn't a lot of people in my year, and I was lucky enough to sit next to someone else who enjoyed programming
We used to compete against each other, who could create a program in the least amount of time while still maintaining efficiency
By this time my knowledge of Visual Basic was pretty good, so I would be making programs such as snakes and ladders, where everything was fully animated

One of my courses involved voluntary work, so I decided to help out my computing teacher and taught some of the younger kids how to program is Visual Basic
I don't think they found it as interested as I did when I was in their seat, but I enjoyed teaching it nonetheless

The final project in computing is what is graded and put towards your final mark, it counts as 30% of the exam so doing good in it eases off the pressure
Everyone who was doing my computing course was given the same task
The task involves a company who are looking for a program to be written, you must plan, design, implement and test it within the time limit
If I remember correctly, the program was to take inputs of computer specifications, work out a rating for each computer (based of their specifications) and display a sorted list of the computers from the highest rating down to the lowest rating
The time limit was 2 weeks
I planned it all out in 30 minutes, designed it in 20 minutes, and it only took a few hours to implement
Testing was probably the longest part, it took a few days, but I managed to get the program finished and in fully working order within half of the time needed

I got the highest marks in my school and got 1st in computing certificate at prize giving

During my time at school, I used to come home and practice programming
Almost every night I would spend a few hours programming in Visual Basic until I felt confident with it

I moved onto other languages, including C#, which at first was really confusing and I didn't know much about it
But, I remembered what I had done at school: A first, Visual Basic was hard, but starting off with the easy stuff, it was really easy to learn
So, I started off with "Hello world!", kept practising, kept reading notes off the internet, kept watching video tutorials on youtube and most importantly, didn't give up

I used to play Emergency 4, and on one of the fan forums there was a section for modifications
I downloaded a few and found out that I had to manually install all of the files, a real pain in the ass
Having some knowledge of C#, I played about with it until I managed to create a program which installed all the files, it was pretty cool
As I learned more of C#, my installer became a downloader, where it would search on my web server for the latest version of the files, check which version was installed, and update accordingly
I don't tend to use C# much now, but it was an interesting language to play about with - I think it's good for game development, but I didn't try that part out

Also while I was at school, I played SA:MP, including Argonath, and when I found out about the samp wiki, I read about all the types of functions I thought it was really cool that you could control players etc.
Again, guess what? I started with the basic "Hello world!", managed to print it out to the console and also to players in game, then I kept learning, kept reading, kept practising
I posted a few things on the SA:MP forum, that was a mistake... You will quickly find out that the people on there have jumped straight into SA:MP scripting without any previous knowledge of programming, they ask stupid questions and get stupid answers

I joined a SA:MP community and started scripting for them, I didn't get far before it shut down, but I still learned how to be a good developer in a community
I was lucky enough to get a place in the Argonath development team, they have good features and a really friendly community

That's pretty much my story about my starting life as a programmer, I started off with the basics and advanced on to the more difficult languages
Pawn isn't that difficult, maybe at first, but when you know the basics it is pretty simple

My advice to you: If you want to take programming seriously then I suggest you take a look at more simple languages such as Visual Basic.. it will teach you the basics of string functions, math and most importantly, the structuring of your code
Then, when you feel confident, read over the SA:MP wiki, get used to the functions, then mess around in an empty script, I really don't suggest downloading scripts from other people because everyone was their own style of programming
For example, looking through xcasio's code, it looks completely different than mine - same language, but different style

While learning Visual Basic, you should read up on important factors such as the readability of your code, how to maintain it and most importantly, if it's fit for purpose

Have fun reading, my PM is open for any questions you may have



Offline Dutchy

  • Hero
  • ****
    • Posts: 5907
  • the dutch dutch from dutchland
  • With us since: 20/10/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • YouTube Channel
  • SA:MP: Dutchy Corleone
  • Discord: Dutchy#6507
Reply #17 on: July 13, 2012, 09:19:47 pm
I thought you only knew DM. :D


Offline Jack Rosso

  • Veteran
  • ***
    • Posts: 711
    With us since: 06/11/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #18 on: July 14, 2012, 12:29:41 am

"I'm nobody. I'm a tramp, a bum, a hobo. I'm a boxcar and a jug of wine... and a straight razor-if you get too close to me." - Charles Manson


Offline Conroy

  • Hero
  • ****
    • Posts: 2140
    With us since: 03/10/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #19 on: July 14, 2012, 12:37:16 am
That too I guess



Offline PSVITATopic starter

  • PSV
  • Regular
  • **
    • Posts: 244
    With us since: 06/12/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #20 on: July 14, 2012, 07:23:24 pm
My own tip would be not to learn from large scripts, especially old ones, as they will be very confusing for a first timer. Old scripts of course will use old/slow methods. You would not want pick up others habits either.

If you were post this question on the SA-MP forum, I can guarantee they would suggest you to download a heavily edited script, usually one stemming from Pen1 for example Godfather. These are too old especially Pen1 which is still available that takes a lot of work to get running and then to continue fixing.

Also worth a mention both of those have a serious login bug.

Lol I never even heard of those scripts :(

You must also be interested in sheep to become an Argonath scripter, especially for SA:MP :rofl:

As for how I learned scripting...
I've always been interested in computers since I was little, and when I got into secondary school, my computing teacher taught the class how to do basic HTML and I found it fascinating that what I type can be displayed on a web page
I think I was the only person who enjoyed it, I was the nerd of the class
Anyway, we moved onto programming in Visual Basic, it was a lot harder than making web pages but I found it more enjoyable
Although a programmer shouldn't compare programming to web development, I feel web development is limited to the browsers capabilities, whereas programming with Visual Basic or other languages is limited to the operating system
Anyway, we continued Visual Basic and I started learning more and more, starting with the classical "Hello world!" to being able to validate user inputs

At my last year of high school, my class got mixed with the year below us because there wasn't a lot of people in my year, and I was lucky enough to sit next to someone else who enjoyed programming
We used to compete against each other, who could create a program in the least amount of time while still maintaining efficiency
By this time my knowledge of Visual Basic was pretty good, so I would be making programs such as snakes and ladders, where everything was fully animated

One of my courses involved voluntary work, so I decided to help out my computing teacher and taught some of the younger kids how to program is Visual Basic
I don't think they found it as interested as I did when I was in their seat, but I enjoyed teaching it nonetheless

The final project in computing is what is graded and put towards your final mark, it counts as 30% of the exam so doing good in it eases off the pressure
Everyone who was doing my computing course was given the same task
The task involves a company who are looking for a program to be written, you must plan, design, implement and test it within the time limit
If I remember correctly, the program was to take inputs of computer specifications, work out a rating for each computer (based of their specifications) and display a sorted list of the computers from the highest rating down to the lowest rating
The time limit was 2 weeks
I planned it all out in 30 minutes, designed it in 20 minutes, and it only took a few hours to implement
Testing was probably the longest part, it took a few days, but I managed to get the program finished and in fully working order within half of the time needed

I got the highest marks in my school and got 1st in computing certificate at prize giving

During my time at school, I used to come home and practice programming
Almost every night I would spend a few hours programming in Visual Basic until I felt confident with it

I moved onto other languages, including C#, which at first was really confusing and I didn't know much about it
But, I remembered what I had done at school: A first, Visual Basic was hard, but starting off with the easy stuff, it was really easy to learn
So, I started off with "Hello world!", kept practising, kept reading notes off the internet, kept watching video tutorials on youtube and most importantly, didn't give up

I used to play Emergency 4, and on one of the fan forums there was a section for modifications
I downloaded a few and found out that I had to manually install all of the files, a real pain in the ass
Having some knowledge of C#, I played about with it until I managed to create a program which installed all the files, it was pretty cool
As I learned more of C#, my installer became a downloader, where it would search on my web server for the latest version of the files, check which version was installed, and update accordingly
I don't tend to use C# much now, but it was an interesting language to play about with - I think it's good for game development, but I didn't try that part out

Also while I was at school, I played SA:MP, including Argonath, and when I found out about the samp wiki, I read about all the types of functions I thought it was really cool that you could control players etc.
Again, guess what? I started with the basic "Hello world!", managed to print it out to the console and also to players in game, then I kept learning, kept reading, kept practising
I posted a few things on the SA:MP forum, that was a mistake... You will quickly find out that the people on there have jumped straight into SA:MP scripting without any previous knowledge of programming, they ask stupid questions and get stupid answers

I joined a SA:MP community and started scripting for them, I didn't get far before it shut down, but I still learned how to be a good developer in a community
I was lucky enough to get a place in the Argonath development team, they have good features and a really friendly community

That's pretty much my story about my starting life as a programmer, I started off with the basics and advanced on to the more difficult languages
Pawn isn't that difficult, maybe at first, but when you know the basics it is pretty simple

My advice to you: If you want to take programming seriously then I suggest you take a look at more simple languages such as Visual Basic.. it will teach you the basics of string functions, math and most importantly, the structuring of your code
Then, when you feel confident, read over the SA:MP wiki, get used to the functions, then mess around in an empty script, I really don't suggest downloading scripts from other people because everyone was their own style of programming
For example, looking through xcasio's code, it looks completely different than mine - same language, but different style

While learning Visual Basic, you should read up on important factors such as the readability of your code, how to maintain it and most importantly, if it's fit for purpose

Have fun reading, my PM is open for any questions you may have


Thank You for taking your time to tell me all this..I want to script because im interested in these things and im sure i'll enjoy it..I guess i will start with Visual Basic (although its not actually basic :rofl:)..Thanx for the advice :)...Oh and congratz on that award at prize giving..Maybe givingit to me?! :rofl:



Offline Ted

  • SA:MP Valar
  • ***
    • Posts: 4871
    With us since: 13/05/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #21 on: July 14, 2012, 11:34:45 pm
Lol I never even heard of those scripts :(

They were once servers which originated from 0.1b



Offline PSVITATopic starter

  • PSV
  • Regular
  • **
    • Posts: 244
    With us since: 06/12/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #22 on: July 16, 2012, 05:48:10 pm
They were once servers which originated from 0.1b

Damn..I got alot to catch up on!



Offline Louis_Keyl

  • Veteran
  • ***
    • Posts: 2675
    With us since: 21/05/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #23 on: July 16, 2012, 07:43:54 pm
For SA:MP you can check the SA:MP wiki for all scripting commands.
Then download some public scripts from the SA:MP forum and try to understand what every single line does.
After that you can attempt to write your own.
When compiling a script, you will see at which lines there are errors or warnings.
The idea is that a script should have 0 errors and 0 warnings to be good.
It might work with warnings, but as a warning can have unwanted effects its best to remove them.

That's what I did basically...



To become a scripter for Argonath requires more than just learning PAWNO  or even being good at it.
What we need is not that you are able to make things shown on SA:MP forums, but that you are able to make what is thought to be impossible there.
You will have to know about the impact of a script to the FPS of the server, how heavy it becomes when 200 players use it at the same time, and most of all how to prevent it from becoming a free advantage for 'smart' users. Within the limits of SA:MP you have to find new and better ways of ding things.
And during all of this you will be restricted by owners who feel things might be too inaccurate, followed by players pushing their ideas, shitted on for every small error or restart and never get the credit you feel you deserve for all the long nights you sat removing that little bug instead of doing your study or job.

Sure from the outside of the mirror it looks like you will be a God. From the inside you wil feel more its more like reversing the letters (doG).
Are you up to it? Then start on the long road.

There can't be more true words than these.



To learn to script, I downloaded a script and my curiosity did the rest. After some time of screwing things up and learning what the lines does with help of the SA:MP Wiki, I learned the basics and well I think we all know what happened next. After that, two years passed until i was offered with the chance to Script here. My tip to you: be curious, don't do something if you don't want to, however if it interests you, if you like it, if you want to do it, even if you're lazy, you'll be allowed to do it. The curiosity of men is the most important thing the humanity has ever done.




Offline Devin

  • Drained
  • Orc
  • *****
    • Posts: 13332
    With us since: 27/07/2008
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: Devin Seville
Reply #24 on: July 16, 2012, 11:50:18 pm
I thought you only knew DM. :D

No dutchy, he learnt that from his mentor, Xcasio.  ;)



Offline zater112

  • Regular
  • **
    • Posts: 353
    With us since: 22/01/2012
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #25 on: July 17, 2012, 12:25:36 am
Its easy and yeah i learn it from youtube  :lol:
alittle afk script lol,

//AFK BRB AFKLIST
new BRB[MAX_PLAYERS];
new AFK[MAX_PLAYERS];
new sendername[MAX_PLAYER_NAME];
new string[256];
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
//======================================
 
public OnPlayerConnect(playerid)
{
        BRB[playerid] = 0;
        AFK[playerid] = 0;
        return 1;
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
//-------------------------[Afklist]---------------------------------------------
if(strcmp(cmdtext, "/afklist", true) == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"AFK players:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(BRB == 1 || AFK == 1)
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,256,"Name: %s || Player ID: %i",sendername,i);
SendClientMessage(playerid,COLOR_WHITE,string);
}
}
}
return 1;
}
//------------------------[BRB]--------------------------------------------------
if(strcmp(cmdtext, "/brb", true) == 0)  {
        if(BRB[playerid] == 0 && AFK[playerid] == 0)
            {
                new str[256];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                format(str, sizeof(str), "INFO: %s will be right back! (/afklist)", sendername);
                        SendClientMessageToAll(COLOR_ORANGE, str);
                        SendClientMessage(playerid, COLOR_WHITE, "You are in different virtual world. Type /back to return.");
                        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 210);
                        BRB[playerid] = 1;
                        AFK[playerid] = 0;
                        return 1;
                }
                else
                {
                        SendClientMessage(playerid, COLOR_WHITE, "You are already in away from keyboard mode. Type /back.");
                        return 1;
                }
        }
//------------------------[Back]--------------------------------------------------
if(strcmp(cmdtext, "/back", true) == 0)
        {
            if(BRB[playerid] == 1 || AFK[playerid] == 1)
            {
                new str[256];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                format(str, sizeof(str), "INFO: %s is back", sendername);
                        SendClientMessageToAll(COLOR_GREEN, str);
                        SetPlayerVirtualWorld(playerid, 0);
                        BRB[playerid] = 0;
                        AFK[playerid] = 0;
                        return 1;
                }
                else
                {
                        SendClientMessage(playerid, COLOR_WHITE, "You are not in away from keyboard mode");
                        return 1;
                }
        }
//------------------------[AFK]--------------------------------------------------
if(strcmp(cmdtext, "/afk", true) == 0)
        {
            if(BRB[playerid] == 0 && AFK[playerid] == 0)
            {
                new str[256];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                format(str, sizeof(str), "INFO: %s is away from keyboard (/afklist)", sendername);
                        SendClientMessageToAll(COLOR_BRIGHTRED, str);
                        SendClientMessage(playerid, COLOR_WHITE, "You are in different virtual world. Type /back to return.");
                        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 123);
                        BRB[playerid] = 0;
                        AFK[playerid] = 1;
                        return 1;
                }
                else
                {
                        SendClientMessage(playerid, COLOR_WHITE, "You are already in away from keyboard mode. Type /back.");
                        return 1;
                }
        }
return 0;
}



Offline Reece

  • Orc
  • *****
    • Posts: 4016
  • Living.
  • With us since: 07/01/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #26 on: July 17, 2012, 12:50:03 am



Offline Conroy

  • Hero
  • ****
    • Posts: 2140
    With us since: 03/10/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #27 on: July 17, 2012, 12:59:33 am
Nice try, but I believe that script is uploaded somewhere else

Shit efficiency, arrays are far too big.. the maximum client message is 128 characters, but arrays are being declared with 256 cells, that's a waste of 128 cells

Declaring a global variable and then using local variables in every command, another 256 cells being wasted

Next time you copy and paste, make sure the code is up to standard



Offline Devin

  • Drained
  • Orc
  • *****
    • Posts: 13332
    With us since: 27/07/2008
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: Devin Seville
Reply #28 on: July 17, 2012, 01:01:38 am
All I have to say is...
Busted.



Offline Julio.

  • Hero
  • ****
    • Posts: 6010
    With us since: 21/07/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: [Rstar]Julio
  • IV:MP: [R*]Julio
  • VC:MP: [R*]Julio
  • V:MP: [R*]Julio
Reply #29 on: July 17, 2012, 01:31:13 am
Nice try, but I believe that script is uploaded somewhere else

Shit efficiency, arrays are far too big.. the maximum client message is 128 characters, but arrays are being declared with 256 cells, that's a waste of 128 cells

Declaring a global variable and then using local variables in every command, another 256 cells being wasted

Next time you copy and paste, make sure the code is up to standard

Like a Sherlock Boss Holmes

Nice to see you take an interest in this PSVita! :)

I'm a hardware man myself, never understood the fascination of code  :lol:



 


free
SimplePortal 2.3.7 © 2008-2025, SimplePortal