AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [INCORRECT TITLE] HELP ME FAST!!!!! (https://forums.alliedmods.net/showthread.php?t=172335)

AlanSuljic 11-19-2011 04:17

[INCORRECT TITLE] HELP ME FAST!!!!!
 
HELLO!!!! I TRY TO COMPILE THIS BUT IT JUST WONT GO!!!
THIS ERROR ShOWS error 013: no entry point (no public functions)
PleASE TELL ME WHATS WRONG!!
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "MOTD"
#define VERSION "1.0"
#define AUTHOR "Massive Boredom"



public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /nagrada","motd")
register_clcmd("say_team /nagrada","motd")

register_cvar("Advertise","90")
set_task(get_cvar_float("Advertise"),"adverti se" , _ , _ , _ , "b")
}



public motd(id,level,cid)
{
new configsdir[200]
new MOTDfile[200]

get_configsdir(configsdir,199)
format(MOTDfile,199,"%s/motd/nagrada.html",configsdir)

show_motd(id,MOTDfile)

return PLUGIN_HANDLED
}
client_print(0,print_chat,"Kucaj /nagrada da vidite sta dobijaju prva 3 na ranku :D!")
return PLUGIN_HANDLED
}

drekes 11-19-2011 04:55

Re: HELP ME FAST!!!!!
 
Next time post code between [php][/php] or [code][/code] tags.
Also don't write everything in uppercase. It's annoying.


PHP Code:

client_print(0,print_chat,"Kucaj /nagrada da vidite sta dobijaju prva 3 na ranku !")
return 
PLUGIN_HANDLED


This code is not part of any function.
Explain what you're trying to do.

Evaldas.Grigas 11-19-2011 05:24

Re: HELP ME FAST!!!!!
 
You want to make that player would get message, that they would need to write /nagrada?
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "MOTD"
#define VERSION "1.0"
#define AUTHOR "Massive Boredom"



public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /nagrada","motd")
    
register_clcmd("say_team /nagrada","motd")
    
    
register_cvar("Advertise","90")
    
set_task(get_cvar_float("Advertise"),"adverti se" "b")
}



public 
motd(id,level,cid)
{
    new 
configsdir[200]
    new 
MOTDfile[200]
    
    
get_configsdir(configsdir,199)
    
format(MOTDfile,199,"%s/motd/nagrada.html",configsdir)
    
    
show_motd(id,MOTDfile)
    
    return 
PLUGIN_HANDLED
}

public 
client_putinserver(id)
{
    if (!
task_exists(id)) set_task(60.0"PrintText" ,id)
}

public 
PrintText(id)
{
    
client_print(id,print_chat,"Kucaj /nagrada da vidite sta dobijaju prva 3 na ranku !")


Something like this?

Snaker beatter 11-19-2011 05:58

Re: HELP ME FAST!!!!!
 
I was making a motd too but i can't add a picture

ConnorMcLeod 11-19-2011 06:04

Re: HELP ME FAST!!!!!
 
Your title doesn't respect forum's rules.

Choose a descriptive title and don't write it in caps.
Change it before you post again.

Snaker beatter 11-19-2011 06:06

Re: [INCORRECT TITLE] HELP ME FAST!!!!!
 
HOw about my comment?

ConnorMcLeod 11-19-2011 06:10

Re: [INCORRECT TITLE] HELP ME FAST!!!!!
 
Next time let's follow rules.
Any similar thread will be trashed.
Locked for 15 days.


All times are GMT -4. The time now is 08:35.

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