Hello!
This simple code not works correctly:
PHP Code:
public plugin_init()
{
set_task(15.0, "simple_spawn", 3423354)
}
public simple_spawn()
{
new players[32], inum
get_players(players, inum, "h")
for (new i = 0; i < inum; ++i)
{
if(cs_get_user_team(players[i]) == CS_TEAM_CT || CS_TEAM_CT)
{
dllfunc(DLLFunc_Spawn, i)
}
}
remove_task(3423354)
}
_____________________________________________ _________________________
And with this version i have an errors in server's console:
PHP Code:
public plugin_init()
{
set_task(15.0, "simple_spawn", 3423354)
}
public simple_spawn(id)
{
dllfunc(DLLFunc_Spawn, id)
remove_task(3423354)
}
Code:
L 01/11/2013 - 10:17:04: [FAKEMETA] Invalid entity
L 01/11/2013 - 10:17:04: [AMXX] Run time error 10 (plugin "test.amxx") (native "dllfunc") - debug not enabled!
L 01/11/2013 - 10:17:04: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
_____________________________________________ _________________________
In this ver. all works fine. Paradox..
PHP Code:
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say ss", "ssfc")
// Add your code here...
}
public ssfc(id) {
dllfunc(DLLFunc_Spawn, id)
}
How i can execute function DDLFuncf_Spawn for all players ?
__________________