AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What is wrong here? (https://forums.alliedmods.net/showthread.php?t=168451)

BlinkHardeR 09-29-2011 10:27

What is wrong here?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>

new const PLUGIN[] = "[X]"
new const AUTHOR[] = "eMDX;3"
new const VERSION[] = "0.0.1"


new td_camtimer;
new 
pArmor get_user_armor;
new 
pHealth get_user_health;
new 
pBullets get_user_ammo;
new 
pHit get_user_attacker;

        public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /cam""camera"ADMIN_BAN)
    
register_clcmd("say /status""status")
    
register_clcmd("say /gurilla""guriilaCMD")
    
td_camtimer register_cvar("td_cam""50.0"ADMIN_BAN)
}
    public 
camera(id)
{
    if(
is_user_alive(id) && is_user_admin(id))
    {
        
set_view(idCAMERA_3RDPERSON)
        
ColorChat(id"You have 3RD Camera activated for %s seconds."td_camtimer)
        
set_task(50.0"EndCamera"id)
    }
}
    public 
EndCamera(id)
{
    if(
is_user_alive(id))
    {
        
set_view(idCAMERA_NONE)
        
ColorChat(id"3RD Camera is now disabled!")
    }
}  
    public 
status(id)
{
    
ColorChat(id"You'r Health Points: %s"pHealth)
    
ColorChat(id"You'r Armor: %s"pArmor)
    
ColorChat(id"You'r Ammo: %s"pBullets)
    
ColorChat(id"You'r Last Attacker: %s"pHit)
}
    public 
gurillaCMD(id)
    {
        
cs_set_user_model(id"gurilla")
    }
    
stock ColorChat(const id, const string[], {FloatSqlResul,_}:...) {
    new 
msg[191], players[32], count 1
    
    
static len
    len 
formatex(msgcharsmax(msg), "^x04[^x03%s^x04]^x01 "PLUGIN)
    
vformat(msg[len], charsmax(msg) - lenstring3)

    if(
id)
        
players[0] = id
    
else
        
get_players(players,count,"ch")
    
    for (new 
0counti++) {
        if(
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"),_players[i])
            
write_byte(players[i])
            
write_string(msg)
            
message_end()
        }
    }


what i did worng here?

(yes i know i toke the CAM from other post... i am trying to do something...)

this is server fail:

[ 21] unknown unknown unknown [X].amx bad load

WAW555 09-29-2011 10:39

Re: What is wrong here?
 
register_clcmd("say /gurilla", "guriilaCMD")

==>

register_clcmd("say /gurilla", "gurillaCMD")

fysiks 09-29-2011 21:57

Re: What is wrong here?
 
Quote:

Originally Posted by WAW555 (Post 1565290)
register_clcmd("say /gurilla", "guriilaCMD")

==>

register_clcmd("say /gurilla", "gurillaCMD")

Unrelated.

Quote:

Originally Posted by BlinkHardeR (Post 1565288)
this is server fail:

[ 21] unknown unknown unknown [X].amx bad load

You need to look at the error description (at the bottom of the list). The most commonly issue is that the .amxx file does not exist (exactly as it is typed in plugins.ini).

Napoleon_be 09-30-2011 02:46

Re: What is wrong here?
 
PHP Code:


new td_camtimer;
new 
pArmor get_user_armor;
new 
pHealth get_user_health;
new 
pBullets get_user_ammo;
new 
pHit get_user_attacker

-->
PHP Code:

new td_camtimer;
new 
pArmor get_user_armor(id);
new 
pHealth get_user_health(id);
new 
pBullets get_user_ammo(id);
new 
pHit get_user_attacker(id); 

This should normally work.

Doc-Holiday 09-30-2011 03:38

Re: What is wrong here?
 
Quote:

Originally Posted by Napoleon_be (Post 1565727)
PHP Code:


new td_camtimer;
new 
pArmor get_user_armor;
new 
pHealth get_user_health;
new 
pBullets get_user_ammo;
new 
pHit get_user_attacker

-->
PHP Code:

new td_camtimer;
new 
pArmor get_user_armor(id);
new 
pHealth get_user_health(id);
new 
pBullets get_user_ammo(id);
new 
pHit get_user_attacker(id); 

This should normally work.


????

enjoi. 09-30-2011 07:30

Re: What is wrong here?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>

new const PLUGIN[] = "[X]"
new const AUTHOR[] = "eMDX;3"
new const VERSION[] = "0.0.1"


new td_camtimer;
new 
pArmor get_user_armor;
new 
pHealth get_user_health;
new 
pBullets get_user_ammo;
new 
pHit get_user_attacker

TO

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>

new const PLUGIN[] = "[X]"
new const AUTHOR[] = "eMDX;3"
new const VERSION[] = "0.0.1"


new td_camtimer;
new 
pArmor get_user_armor(id);
new 
pHealth get_user_health(id);
new 
pBullets get_user_ammo(id);
new 
pHit get_user_attacker(id); 


??lol idk how to code

Hunter-Digital 09-30-2011 07:55

Re: What is wrong here?
 
It's pretty obvious what happened... the code didn't compile but the compiler created a .amxx file, which is obviously invalid, but he didn't care to read and placed it into plugins anyway... that's why it gives bad load.

fysiks 09-30-2011 22:06

Re: What is wrong here?
 
I totally missed the incorrect use of code lol.

Doc-Holiday 10-02-2011 15:27

Re: What is wrong here?
 
Quote:

Originally Posted by fysiks (Post 1566196)
I totally missed the incorrect use of code lol.

LOL!... i did the same even looking at that my eyes added the (id);'s


All times are GMT -4. The time now is 19:38.

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