AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Lead me in the right direction.. (https://forums.alliedmods.net/showthread.php?t=11439)

|2eM!x 03-19-2005 14:42

Lead me in the right direction..
 
I finally figured out how to install this stuff, and the compiler actually works.

Can you just give me some easy stuff to make? Like how to make a tsay type thing, or when admin enters server a tsay pops up, or something that tells your health, or moves your health...anything..
I really appreciate it

Peli 03-19-2005 14:55

Well , you can first start off by reading the tutorials... one on the Amxmodx.org/doc page , and you can search for more here... plus you can read other peoples plugins. Ones that have to do with messages , like the kinds you want to know about and look at their code after you read some basic tutorials , then you can practice and see how they did it.

v3x 03-19-2005 14:55

Something simple like this should work for getting a users health in chat:
Code:
#include <amxmodx> public plugin_init() {     // Registers your plugin <Plugin name | Version | Author>     register_plugin("Say Health","1.0","John Doe")     // Registers the command. "say /health" is the command     // and "sayHealth" is the function it's linked to     register_clcmd("say /myhp","sayHealth") } // Make the function public sayHealth(id) {     // Checks if the user is alive     if(!is_user_alive(id)) {         // If he isn't alive then print this message         client_print(id,print_chat,"[AMXX] Your health is 0 =]")     }     // Else.. (if he is alive)     else {         // Get his health         new hp = get_user_health(id)         // Print his health in chat         client_print(id,print_chat,"[AMXX] Your health is %d",hp)     }     return PLUGIN_HANDLED }

Just say /myhp in chat.

|2eM!x 03-19-2005 15:19

great so ive read the whole tutorial and learned nothing...
ill look at your code, but can you add comments so i can see what you did? Also could you show me how id whisper another person? something like you type |2eM!x - Hello buddy

and only i would get it?

v3x 03-19-2005 15:30

I commented it a little bit. :up:

|2eM!x 03-19-2005 23:50

thanks for your help, but it doesnt work...
Ive tried typing everything in that code in the chat,(the stuff that applies)

and none work. /myhp does not work as well...please help?

v3x 03-20-2005 00:16

Woops, my bad.. Try it now..

|2eM!x 03-20-2005 00:29

nice man it works. Now if you could point me in the direction of a tsay type thing thatd be nice : )

v3x 03-20-2005 00:30

Like what?

|2eM!x 03-20-2005 00:41

just like in game type //say "text"
something like that..
im sorry if im buggin you by the way, there are no real good tutorials on this stuff here, on vb at least i had stuff to work with.

One last question, how would i get the users health, and make it down to 50, then up to 200, and they cant move until they press space witch kills the timer?

I dunno if thats hard or anything. Maybe i should start off easier :D


All times are GMT -4. The time now is 14:16.

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