AlliedModders

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

Invalid 07-17-2010 06:09

Message Help :)
 
Hi, I were following an tutorial that if I were writing /tutorial should I get gravity and 150 hp but I wanna do so it says to everybody that "(user) are using steroids!" I hope you know what I mean thx :)

Jelle 07-17-2010 08:31

Re: Message Help :)
 
server_print?

mottzi 07-17-2010 08:31

Re: Message Help :)
 
What? You want that when a player says: /tutorial then a Hudmessage will appear and this player gets 150HP and gravity?

DarkGod 07-17-2010 12:23

Re: Message Help :)
 
Code:
#include <amxmodx> #include <fun> public plugin_init() {    //registers the command "say /tutorial" and calls cmdTutorial when someone says it    register_clcmd("say /tutorial", "cmdTutorial") } public cmdTutorial(index) {    //checks if he's alive first    if(is_user_alive(index)   )    {       //sets his health       set_user_health(index, 150)       //sets his gravity to half (400)       set_user_gravity(index, 0.5)       //new variable to store his name       new szName[32]       //gets names and stores it in szName       get_user_name(index, szName, charsmax(szName)   )       //prints to everyone that he is on steroids       client_print(0, print_chat, "%s is on steroids!", szName)    } }

Written in browser, so may be indentation warnings.

Invalid 07-18-2010 04:47

Re: Message Help :)
 
yay :) thx :P

Zpoke 07-19-2010 06:58

Re: Message Help :)
 
nice, and very simpel


All times are GMT -4. The time now is 07:13.

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