I am a big Noob... Can someone fix plugin to work fine ?
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <ftp>
#include <zombieplague>
#define PLUGIN "ZombiePlagueTracker>"
#define VERSION "1.0"
#define AUTHOR "Sp@jk"
new const file[] = "config.php";
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task(30.0,"takeinfo")
}
public takeinfo()
{
new data4[128]
new data3[128]
new data2[128]
new data5[128]
new data1[128]
new map[41]
get_mapname(map,40);
new maxpl= get_maxplayers();
new pl = get_playersnum(0);
new zombies = zp_get_zombie_count();
new humans = zp_get_human_count();
formatex(data1,127,"$map = %s",map)
formatex(data2,127,"$maxpl = %s",maxpl)
formatex(data3,127,"$pl = %s",pl)
formatex(data4,127,"$zombies = %s",zombies)
formatex(data5,127,"$humans = %s",humans)
delete_file(file);
write_file(file,"<?php",-1);
write_file(file,data1,-1);
write_file(file,data2,-1);
write_file(file,data3,-1);
write_file(file,data4,-1);
write_file(file,data5,-1);
write_file(file,"?>",-1);
}
It compiles fine but it's ot working good. The output file looks like this:
Code:
<?php
$map = zm_dust2
$maxpl = zm_dust2
$pl = zm_dust2
$zombies = zm_dust2
$humans = zm_dust2
?>