AlliedModders

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

Ghyth 03-08-2014 13:48

Error
 
that throws me error?
PHP Code:

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

#define PLUGIN "RR FM"
#define VERSION "1.0"
#define AUTOR "Ghyth"

new spFile[96]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTOR)
    
register_clcmd("amx_restart","cmdRR",ADMIN_CVAR)
    
set_task(54.45,"cancion")
    
set_task(54.5,"aviso")
    
set_task(55.1,"aviso1")
    
set_task(56.8,"aviso2")
    
set_task(57.5,"aviso3")
    
set_task(58.2,"aviso4")
    
set_task(60.4,"aviso5")
    
set_task(62.0,"Autorr")
}

public 
plugin_precache()
{
    
formatspFile95"sound/fm/rr.wav")
    if(
file_exists(spFile))
    {
        
precache_sound("fm/rr.wav")
    }
}

public 
cmdRR(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1))
        return 
PLUGIN_HANDLED
        
    set_task
(0.1,"setear",id)
    
    return 
PLUGIN_HANDLED
}

public 
setear(id)
{
    
set_task(1.45,"cancion")
    
set_task(1.5,"aviso")
    
set_task(2.1,"aviso1")
    
set_task(2.8,"aviso2")
    
set_task(3.5,"aviso3")
    
set_task(4.2,"aviso4")
    
set_task(6.3,"aviso5")
    
set_task(7.5,"Autorr")
    new 
name[32]
    
get_user_name(idnamesizeof(name) - 1)
    
client_print(0,print_chat,"Staff: Zow - HammeR.- - Jwo' - LeoO!!!!!",name)
}

public 
cancion()
{
    if(
file_exists(spFile))
    {
        
client_cmd(0,"spk sound/fm/rr.wav")
    }
}
public 
aviso(){
    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Empieza la Diversion!!! |--")
    new 
iPlayers32 ], iNumConos
    get_players
iPlayersiNum )
    for( new 
0iNumi++ ) 
    {
        
Conos iPlayers[i]

    }
    
Temblor(Conos)
    
}
public 
aviso1(){

    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Five-Muderers |--")
}
public 
aviso2(){

    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Creciendo Junto a vos |--")
}
public 
aviso3(){

    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Divertite |--")
}
publico aviso4(){
    
    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Gracias por Jugar |--")
}
public 
aviso5(){

    
set_hudmessage(25517085, -1.00.316.02.0)
    
show_hudmessage(0"--| A Jugar :D!!! |--")
    new 
iPlayers32 ], iNumConos
    get_players
iPlayersiNum )
    for( new 
0iNumi++ ) 
    {
        
Conos iPlayers[i]

    }
    
Temblor(Conos)
}

public 
Autorr()
{
    
set_hudmessage(25517085, -1.00.316.02.0)
    
show_hudmessage(0,"Ghyth")
    
server_cmd("mp_freezetime 3")
    
server_cmd("sv_restart 1")
    
set_task(2.0,"Vale")
}

public 
Vale()
{
    new 
iPlayers32 ], iNumConos
    get_players
iPlayersiNum )
    for( new 
0iNumi++ ) 
    {
        
Conos iPlayers[i]
        
ScreenBlack(Conos)
    }
    new 
host[128],ip[32]
    
get_cvar_string("hostname"host127
    
get_cvar_string("net_address"ip31
    
set_hudmessage(random_num(55,255), random_num(55,255), random_num(55,255), -1.0, -1.016.08.0)
    
show_hudmessage(0,"%s ^n %s  ",host,ip)
    
server_cmd("mp_freezetime 0")
}

public 
Temblor(Conos)
{
    
message_begin(MSG_ALLget_user_msgid("ScreenShake"), {0,0,0}, Conos)
    
write_short(255<< 14 //ammount 
    
write_short(10 << 14//lasts this long 
    
write_short(255<< 14//frequency 
    
message_end() 
}
public 
ScreenBlack(Conos
{
    
message_begin(MSG_ALL,get_user_msgid("ScreenFade"),{0,0,0},Conos
    
write_short(1<<15)
    
write_short(1<<13)
    
write_short(1<<12
    
write_byte
    
write_byte
    
write_byte
    
write_byte255 
    
message_end()



YamiKaitou 03-08-2014 15:19

Re: Error
 
Errors?

Baws 03-08-2014 15:29

Re: Error
 
Fixed: lol it's public not publico amigo ;)
PHP Code:

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

#define PLUGIN "RR FM"
#define VERSION "1.0"
#define AUTOR "Ghyth"

new spFile[96]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTOR)
    
register_clcmd("amx_restart","cmdRR",ADMIN_CVAR)
    
set_task(54.45,"cancion")
    
set_task(54.5,"aviso")
    
set_task(55.1,"aviso1")
    
set_task(56.8,"aviso2")
    
set_task(57.5,"aviso3")
    
set_task(58.2,"aviso4")
    
set_task(60.4,"aviso5")
    
set_task(62.0,"Autorr")
}

public 
plugin_precache()
{
    
formatspFile95"sound/fm/rr.wav")
    if(
file_exists(spFile))
    {
        
precache_sound("fm/rr.wav")
    }
}

public 
cmdRR(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1))
        return 
PLUGIN_HANDLED
        
    set_task
(0.1,"setear",id)
    
    return 
PLUGIN_HANDLED
}

public 
setear(id)
{
    
set_task(1.45,"cancion")
    
set_task(1.5,"aviso")
    
set_task(2.1,"aviso1")
    
set_task(2.8,"aviso2")
    
set_task(3.5,"aviso3")
    
set_task(4.2,"aviso4")
    
set_task(6.3,"aviso5")
    
set_task(7.5,"Autorr")
    new 
name[32]
    
get_user_name(idnamesizeof(name) - 1)
    
client_print(0,print_chat,"Staff: Zow - HammeR.- - Jwo' - LeoO!!!!!",name)
}

public 
cancion()
{
    if(
file_exists(spFile))
    {
        
client_cmd(0,"spk sound/fm/rr.wav")
    }
}
public 
aviso(){
    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Empieza la Diversion!!! |--")
    new 
iPlayers32 ], iNumConos
    get_players
iPlayersiNum )
    for( new 
0iNumi++ ) 
    {
        
Conos iPlayers[i]

    }
    
Temblor(Conos)
    
}
public 
aviso1(){

    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Five-Muderers |--")
}
public 
aviso2(){

    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Creciendo Junto a vos |--")
}
public 
aviso3(){

    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Divertite |--")
}
public 
aviso4()
{
    
    
set_hudmessage(25517085, -1.00.316.05.0)
    
show_hudmessage(0"--| Gracias por Jugar |--")
}
public 
aviso5(){

    
set_hudmessage(25517085, -1.00.316.02.0)
    
show_hudmessage(0"--| A Jugar :D!!! |--")
    new 
iPlayers32 ], iNumConos
    get_players
iPlayersiNum )
    for( new 
0iNumi++ ) 
    {
        
Conos iPlayers[i]

    }
    
Temblor(Conos)
}

public 
Autorr()
{
    
set_hudmessage(25517085, -1.00.316.02.0)
    
show_hudmessage(0,"Ghyth")
    
server_cmd("mp_freezetime 3")
    
server_cmd("sv_restart 1")
    
set_task(2.0,"Vale")
}

public 
Vale()
{
    new 
iPlayers32 ], iNumConos
    get_players
iPlayersiNum )
    for( new 
0iNumi++ ) 
    {
        
Conos iPlayers[i]
        
ScreenBlack(Conos)
    }
    new 
host[128],ip[32]
    
get_cvar_string("hostname"host127
    
get_cvar_string("net_address"ip31
    
set_hudmessage(random_num(55,255), random_num(55,255), random_num(55,255), -1.0, -1.016.08.0)
    
show_hudmessage(0,"%s ^n %s  ",host,ip)
    
server_cmd("mp_freezetime 0")
}

public 
Temblor(Conos)
{
    
message_begin(MSG_ALLget_user_msgid("ScreenShake"), {0,0,0}, Conos)
    
write_short(255<< 14 //ammount 
    
write_short(10 << 14//lasts this long 
    
write_short(255<< 14//frequency 
    
message_end() 
}
public 
ScreenBlack(Conos
{
    
message_begin(MSG_ALL,get_user_msgid("ScreenFade"),{0,0,0},Conos
    
write_short(1<<15)
    
write_short(1<<13)
    
write_short(1<<12
    
write_byte
    
write_byte
    
write_byte
    
write_byte255 
    
message_end()



extream87 03-10-2014 12:00

Re: Error
 
Glyth

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #include <engine> #include <fakemeta> #include <dhudmessage> #define PLUGIN "RR FM" #define VERSION "1.0" #define AUTOR "Ghyth" new spFile[96] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTOR)     register_clcmd("amx_restart","cmdRR",ADMIN_CVAR)     set_task(54.45,"cancion")     set_task(54.5,"aviso")     set_task(57.1,"aviso1")     set_task(59.8,"aviso2")     set_task(62.5,"aviso3")     set_task(65.2,"aviso4")     set_task(67.2,"aviso5")     set_task(70.0,"Autorr") } public plugin_precache() {     format( spFile, 95, "sound/fm/rr.wav")     if(file_exists(spFile))     {         precache_sound("fm/rr.wav")     } } public cmdRR(id,level,cid) {     if(!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED             set_task(0.1,"setear",id)         return PLUGIN_HANDLED } public setear(id) {     set_task(1.45,"cancion")     set_task(1.5,"aviso")     set_task(4.1,"aviso1")     set_task(6.8,"aviso2")     set_task(8.5,"aviso3")     set_task(10.2,"aviso4")     set_task(12.2,"aviso5")     set_task(15.5,"Autorr")     new name[32]     get_user_name(id, name, sizeof(name) - 1)     client_print(0,print_chat,"Staff: Zow - HammeR.- - Jwo' - Leito!!!!!",name) } public cancion() {     if(file_exists(spFile))     {         client_cmd(0,"spk sound/fm/rr.wav")     } } public aviso(){     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 5.0)     show_hudmessage(0, "--| Bienvenidos a|--") } public aviso1(){     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 5.0)     show_hudmessage(0, "--| Five-Muderers |--") } public aviso2(){     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 5.0)     show_hudmessage(0, "--| Creciendo Junto a vos |--")     new iPlayers[ 32 ], iNum, Conos     get_players( iPlayers, iNum )     for( new i = 0; i < iNum; i++ )     {         Conos = iPlayers[i]     }     Temblor(Conos)     } public aviso3(){     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 5.0)     show_hudmessage(0, "--| Divertite |--") } public aviso4(){     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 5.0)     show_hudmessage(0, "--| Empieza la Diversion!!!! |--") } public aviso5(){     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 2.0)     show_hudmessage(0, "--| Zow - HammeR.- - Jwo' - Leito |--")     new iPlayers[ 32 ], iNum, Conos     get_players( iPlayers, iNum )     for( new i = 0; i < iNum; i++ )     {         Conos = iPlayers[i]     }     Temblor(Conos) } public Autorr() {     set_hudmessage(255, 170, 85, -1.0, 0.3, 1, 6.0, 2.0)     show_hudmessage(0,"Ghyth")     server_cmd("mp_freezetime 3")     set_task(2.0,"Vale")     server_cmd("sv_restart 1") } public Vale() {     new iPlayers[ 32 ], iNum, Conos     get_players( iPlayers, iNum )     for( new i = 0; i < iNum; i++ )     {         Conos = iPlayers[i]         ScreenBlack(Conos)     }     new host[128],ip[32]     get_cvar_string("Five-Muderers", host, 127)     get_cvar_string("net_address", ip, 31)     set_hudmessage(random_num(55,255), random_num(55,255), random_num(55,255), -1.0, -1.0, 1, 6.0, 8.0)     show_hudmessage(0,"Five-Muderers ^n %s  ",host,ip)     server_cmd("mp_freezetime 0") } public Temblor(Conos) {     message_begin(MSG_ALL, get_user_msgid("ScreenShake"), {0,0,0}, Conos)     write_short(255<< 14 ) //ammount     write_short(15 << 14) //lasts this long     write_short(255<< 14) //frequency     message_end() } public ScreenBlack(Conos) {     message_begin(MSG_ALL,get_user_msgid("ScreenFade"),{0,0,0},Conos)     write_short(1<<15)     write_short(1<<13)     write_short(1<<12)     write_byte( 0 )     write_byte( 0 )     write_byte( 0 )     write_byte( 255 )     message_end() }

Why you put this if you not use it?
Code:
public ScreenRender() {     message_begin(MSG_BROADCAST, g_msgScreenFade) // Open The Function     write_short((1<<12)*4) // Duration     write_short(floatround((1<<12)*(Time+2.2))) // Hold Time     write_short(0x0001) // Fade Type     write_byte(random_num) // Color Red     write_byte(random_num) // Color Green     write_byte(random_num) // Color Blue     write_byte(0) // Alpha: 255 = Se oscurece toda la Pantalla     message_end() // Close The Funcion }

Ghyth 03-10-2014 12:36

Re: Error
 
I will use it. But it throws me error and I like to be random colors


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

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