All people which working in our work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: All people which working in our work (
/showthread.php?tid=449216)
All people which working in our work -
deimantas1 - 07.07.2013
Hello, me need a code which show list in SendClientMessage people which working in our work (And not online people). And their XP count.
Thanks.
Re: All people which working in our work -
deimantas1 - 08.07.2013
With MySQL.
Re: All people which working in our work -
CaveDweller - 08.07.2013
pawn Код:
mysql_function_query(dbHandle, "SELECT `name`, `xp` FROM `team` ORDER BY `xp` ASC", true, "ShowTeam", "i", playerid);
pawn Код:
public ShowTeam(playerid)
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
new temp[9], i, name[24], xp, string[128];
while(i < rows)
{
cache_get_row(i, 0, name);
cache_get_row(i, 1, temp);
xp = strval(temp);
format(string, sizeof(string), "%s - %d exp", name, xp);
SendClientMessage(playerid, white, string);
i++;
}
}
return 1;
}
It'll need some work to fit into your GM but I won't spoonfeed you on how to do that.
Re: All people which working in our work -
deimantas1 - 08.07.2013
Thanks.