Először is. Ez ugye a forráskódja a statnullázónak.
Kód:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define adtime 600.0 //Default of 10 minuites
new pcvar_Advertise
new pcvar_Display
public plugin_init()
{
register_plugin("Reset Score", "1.0", "Silenttt")
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /rs", "reset_score")
pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
pcvar_Display = register_cvar("sv_rsdisplay", "0")
if(get_cvar_num("sv_rsadvertise") == 1)
{
set_task(adtime, "advertise", _, _, _, "b")
}
}
public reset_score(id)
{
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
if(get_pcvar_num(pcvar_Display) == 1)
{
new name[33]
get_user_name(id, name, 32)
client_print(0, print_chat, "%s nullazta a statjat.", name)
}
else
{
client_print(id, print_chat, "A statod sikeresen lenullazva!")
}
}
public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz")
}
public client_putinserver(id)
{
if(get_pcvar_num(pcvar_Advertise) == 1)
{
set_task(10.0, "connectmessage", id, _, _, "a", 1)
}
}
public connectmessage(id)
{
if(is_user_connected(id))
{
client_print(id, print_chat, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz (nem kell reconnectelned)")
}
}
Ebben van egy ilyen rész:
Kód:
client_print(id, print_chat, "A statod sikeresen lenullazva!")
Azon belűl is:
Kód:
A statod sikeresen lenullazva!
Ezt átírod, amire akarod. Majd bemásolod a konvertálóba. (
ITT találod.)
Majd rálépsz az "Átalakít" gombra.
Hogyha ilyesmit ír:
Kód:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Header size: 548 bytes
Code size: 1380 bytes
Data size: 1476 bytes
Stack/heap size: 16384 bytes; estimated max. usage=779 cells (3116 bytes)
Total requirements: 19788 bytes
Done.
Akkor jó. Hogyha ilyesmit:
Kód:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
files/5497095/5497095.sma(1) : error 010: invalid function or declaration
files/5497095/5497095.sma(2) : error 010: invalid function or declaration
files/5497095/5497095.sma(4) : error 010: invalid function or declaration
files/5497095/5497095.sma(10) : warning 203: symbol is never used: "Copyright"
files/5497095/5497095.sma(10) : error 013: no entry point (no public functions)
4 Errors.
Could not locate output file 5497095.amx (compile failed).
Akkor rossz. Hogyha 1 vagy több error van benne akkor rossz a forráskód.
Hogyha csak warningot ír, akkor elméletileg jó lesz a plugin, de nem tökéletes a foráskód.
Warningos:
Kód:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
files/3183969/3183969.sma(51) : warning 217: loose indentation
Header size: 548 bytes
Code size: 1380 bytes
Data size: 1476 bytes
Stack/heap size: 16384 bytes; estimated max. usage=779 cells (3116 bytes)
Total requirements: 19788 bytes
1 Warning.
Done.