AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Start Scripting. (https://forums.alliedmods.net/showthread.php?t=99703)

Udi 08-08-2009 14:24

Start Scripting.
 
Hello im new here, and i would like to learn how to use the amxx scripting.
If there any tut or guide from A to Z ill be very happy to get it. :)
If any other way to learn ill be happy to get the links.
Ty vey much,
Udi.

Alucard^ 08-08-2009 15:34

Re: Start Scripting.
 
http://forums.alliedmods.net/forumdisplay.php?f=83
http://forums.alliedmods.net/showthread.php?t=6512

You have to use Search next time =p

Udi 08-08-2009 15:52

Re: Start Scripting.
 
I tried :D
But in the first link i didnt found a good guide..
so, if ill follow thw 2nd link ill know how to make amxx plugins?

fysiks 08-08-2009 16:34

Re: Start Scripting.
 
Quote:

Originally Posted by Udi (Post 893650)
But in the first link i didnt found a good guide..

That's because you don't know what you are looking for obviously.

Quote:

Originally Posted by Udi (Post 893650)
so, if ill follow thw 2nd link ill know how to make amxx plugins?

If you don't know how to search it's doubtful.

I would probably start here and look around there on the wiki.

It's all about trial and error.

ConnorMcLeod 08-08-2009 16:57

Re: Start Scripting.
 
http://forums.alliedmods.net/showthr...042#post560042

Udi 08-08-2009 18:10

Re: Start Scripting.
 
Ty all!
And I have a little prob with the wiki guid:
Code:

    new Arg1[24]
    new Arg2[4]
 
    //Get the command arguments from the console
    read_argv(1, Arg1, 23)
    read_argv(2, Arg2, 3)
 
    //Convert the health from a string to a number
    new Health = str_to_num(Arg2)

I didnt understood whats the mean of Arg1[24] and Arg2[3] , and why after that it became to
read_argv(1, Arg1, 23)
and

read_argv(2, Arg2, 3)

Jack86 08-08-2009 18:38

Re: Start Scripting.
 
arg1 and arg2 are arguments (values) entered via command, and with read_argv u read them into designated variable, read_argv(1 is first entered value, read_argv(2 is second, read_argv(0 is command itself and its never used.

Udi 08-08-2009 18:56

Re: Start Scripting.
 
ok but what is that:
new Arg1[24]
new Arg2[4]

The [24] and [4]
and why the changed to [23] [3]?
and what is the meaning of thoose arguments, and what each argument consider to?
the command is: amx_ho nick hp . if it help u

fysiks 08-08-2009 20:02

Re: Start Scripting.
 
Quote:

Originally Posted by Jack86 (Post 893793)
read_argv(0 is command itself and its never used.

"Never say never" is a good cliche to point out here.

Quote:

Originally Posted by Udi (Post 893810)
ok but what is that:
new Arg1[24]
new Arg2[4]

The [24] and [4]
and why the changed to [23] [3]?
and what is the meaning of thoose arguments, and what each argument consider to?
the command is: amx_ho nick hp . if it help u

Arg1 and Arg2 are used as string variables. The end of a string is denoted by the null character. So, for Arg1[24], the longest string you can have is 23 characters long because the 24th one is the null character.

ConnorMcLeod 08-09-2009 04:36

Re: Start Scripting.
 
Quote:

Originally Posted by Jack86 (Post 893793)
read_argv(0 is command itself and its never used.

It could be used in the case you use the same handler for multiple functions.


All times are GMT -4. The time now is 18:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.