Hi, i need help to fix all the error i have amxx file but i dont have sma file i will make decompile amxx to sma and here is the output resault but it have lot of error can anyone help me for fix the all error and make fresh compile sma file.
new MaxClients;
new String:NULL_STRING[4];
new Float:NULL_VECTOR[3];
replace_all(string[], len, what[], with[])
{
new pos;
if ((pos = contain(string, what)) == -1)
{
return 0;
}
new total;
new with_len = strlen(with);
new diff = strlen(what) - with_len;
new total_len = strlen(string);
new temp_pos;
while (replace(string[pos], len - pos, what, with))
{
total++;
pos = with_len + pos;
total_len -= diff;
if (!(pos >= total_len))
{
temp_pos = contain(string[pos], what);
if (!(temp_pos == -1))
{
pos = temp_pos + pos;
}
return total;
}
return total;
}
return total;
}
public plugin_init()
{
register_plugin("welcome & dead hud", "1.0", "Farhan Shaikh");
register_clcmd("say /offhud", "cmdHudOff", -1, 256, -1, MaxClients);
register_clcmd("say /onhud", "cmdHudOn", -1, 256, -1, MaxClients);
return 0;
}
public client_putinserver(id)
{
set_task(1084227584, "show_dead_hud", id, 404, MaxClients, 396, MaxClients);
set_task(1084227584, "welcomemsg", id, 404, MaxClients, 452, MaxClients);
return 0;
}
public show_dead_hud(id)
{
if (!is_user_connected(id))
{
return 0;
}
new var1;
if (is_user_connected(id) && !is_user_alive(id))
{
set_hudmessage(MaxClients, 255, 252, 1008981770, 1045220557, MaxClients, 1086324736, 1084227584, 1036831949, 1045220557, -1);
show_hudmessage(id, "~~~~~~~~~~~~~~~~~~~ \n Save all our IP's, If the Main IP is \n not visible then kindly try joining from other IP \n * 152.67.27.93:27015 \n * 144.24.100.130:27015 \n * 140.238.167.130:27015\n Type /offhud To Remove This Message \n~~~~~~~~~~~~~~~~~~~");
}
return 0;
}
public cmdHudOff(id)
{
remove_task(id, MaxClients);
ColorChat(id, "!gYour turned !tOFF !ghud");
return 0;
}
public cmdHudOn(id)
{
show_dead_hud(id);
set_task(1065353216, "show_dead_hud", id, 404, MaxClients, 1588, MaxClients);
ColorChat(id, "!gYou turned !tON !ghud");
return 0;
}
public welcomemsg(id)
{
set_hudmessage(MaxClients, 255, 42, -1082130432, 1050253722, MaxClients, 1086324736, 1084227584, 1036831949, 1045220557, -1);
show_hudmessage(id, "~~~~~~~~~~~~~~~~~~~ \n Save all our IP's, If the Main IP is \n not visible then kindly try joining from other IP \n * 152.67.27.93:27015 \n * 144.24.100.130:27015 \n * 140.238.167.130:27015\n ~~~~~~~~~~~~~~~~~~~");
ColorChat(id, "!t==>> !gSave all our IP's, If the Main IP is not visible then kindly try joining from other IP");
ColorChat(id, "!t==>> !y*!g152.67.27.93:27015 !y*!g144.24.100.130:27015 !y*!g140.238.167.130:27015");
return 0;
}
ColorChat(id, input[])
{
new count = 1;
new players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!y", 4012);
replace_all(msg, 190, "!g", 4032);
replace_all(msg, 190, "!t", 4052);
if (id)
{
players[0] = id;
}
else
{
get_players(players, count, "ch", 4072);
}
new i;
while (i < count)
{
if (is_user_connected(players[i]))
{
message_begin(NULL_VECTOR, get_user_msgid("SayText"), 4108, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
i++;
}
return 0;
}
|