AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with these (https://forums.alliedmods.net/showthread.php?t=54166)

Samurai [/] 04-18-2007 17:02

Need help with these
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <geoip>
 
#define PLUGIN "PLUGIN"
#define VERSION "VERSION"
#define AUTHOR "AUTHOR"
 
 
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /country""scan_text" )
}
 
public 
client_connect(id)
{
    new 
arg[128], name[64];
    
read_argv(1,arg,127);
    new 
id str_to_num(arg);
    
get_user_name(id,name,63);
 
    new 
usrip[33], result[46];
    
get_user_ip(idusrip321); 
    
geoip_country(usripresult45);
    
client_print(idprint_chat"[AMXX] %s is from %s"nameresult);
 


Why doesent this work?

And

PHP Code:

public Foot_steps(id)
{
if(
cs_get_user_team(id) == CS_TEAM_T)
{
set_user_footsteps (id1)
}
//how to set silents footsteps to terrorist only? 

and
PHP Code:

public client_connect(id)
{
if(
is_user_admin(id))
{
new 
name[18
get_user_name(idname17)
client_cmd (0"spk %s"g_sound1)
set_hudmessage(255255255, -1.0, -1.006.012.0)
show_hudmessage(0"Admin %s connected"name)


How im going to set hudmessage when admin connect?

and is it possible to make plugin that allows admins to spectate everyone, but normal players just teammates?

Nican 04-18-2007 17:11

Re: Need help with these
 
You know, you should start to look at other people plugins, and look how it is made

1.
PHP Code:

public client_authorized(id){
new 
name[64]
get_user_name(id,name,63);
new 
usrip[33], result[46];
get_user_ip(idusrip321); 
geoip_country(usripresult45);
//Send message to him self? lol
client_print(0print_chat"[AMXX] %s is from %s"nameresult);


2.
PHP Code:

public SilentFootTsteps()
{
for(new 
i=0;i<=get_maxplayers();i++)
if(
cs_get_user_team(id) == CS_TEAM_T)
set_user_footsteps (id0)


3. You can use the hud-message generator in the AMXX-Studio "Generator" tab

Samurai [/] 04-18-2007 17:22

Re: Need help with these
 
Quote:

Originally Posted by Nican (Post 466907)
You know, you should start to look at other people plugins, and look how it is made

1.
PHP Code:

public client_authorized(id){
new 
name[64]
get_user_name(id,name,63);
new 
usrip[33], result[46];
get_user_ip(idusrip321); 
geoip_country(usripresult45);
//Send message to him self? lol
client_print(0print_chat"[AMXX] %s is from %s"nameresult);
}
//little typo only or i forgot id 

2.
PHP Code:

public SilentFootTsteps()
{
for(new 
i=0;i<=get_maxplayers();i++)
if(
cs_get_user_team(id) == CS_TEAM_T)
set_user_footsteps (id0)


3. You can use the hud-message generator in the AMXX-Studio "Generator" tab
Already generated by it..

set_user_footsteps - Gives player silent footsteps if set is 1. (you set it to 0) did u even try compile ur version of silentfootsteps?

Samurai [/] 04-19-2007 02:20

Re: Need help with these
 
Quote:

Originally Posted by regalis (Post 466958)
Did you even try to be happy about help from people?
Someone is spending his time to help you and you don't appreciate it...
I tried to help you and received -karma....
Do you think i will try t ohelp you another time?
I don't think so!

Read the manual or look at other peoples plugins for information how to code!
Btw.: You said my plugins suck...one of your questions is solved in one of my plugins!!!!

greetz regalis

wow, you should stop spamming else soon you're banned. Btw, i gave +karma all others.. Except you because u spam or you gave that link what wasnt contained any way to my problem..

scrtxxcaz 04-19-2007 03:11

Re: Need help with these
 
try....

Code:

public client_putinserver(id)
{
new admin = is_user_admin(id)

if(admin)
{

        new name[18],players[32],num
        get_user_name(admin, name, 17)

        get_players(players,num)
        set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
        for(new g = 0;g < num;g++)
        {
                client_cmd (players[g], "spk %s", g_sound1)
                show_hudmessage(players[g], "Admin %s connected", name)

        }
      //all players here sound and see message



Samurai [/] 04-19-2007 04:44

Re: Need help with these
 
should it be on connect how that script will check connect?

Nican 04-19-2007 07:17

Re: Need help with these
 
client_putinserver and client_authorized and client_connect are the three connection function

first happens client_connect, than the other two, which has no particular order

you can not get steam_id on client_connect, so i use client_authorized

Samurai [/] 04-19-2007 14:51

Re: Need help with these
 
silent footsteps wont compile..

scrtxxcaz 04-19-2007 15:50

Re: Need help with these
 
what are the lines of code that you wrote for it

Nican 04-19-2007 16:00

Re: Need help with these
 
This compiles:
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public SilentFootTsteps()
{
    for(new 
i=0;i<=get_maxplayers();i++)
    if(
cs_get_user_team(i) == CS_TEAM_T)
        
set_user_footsteps (i0)
      




All times are GMT -4. The time now is 06:34.

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