SA-MP Forums Archive
Help Dj please :) - 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: Help Dj please :) (/showthread.php?tid=596844)



Help Dj please :) - Adornil - 23.12.2015

can any one tell me /djs cmd code i cant create /djs it will show online dj and also i create dj system but i cant create this cmd /djs please help

and sorry for my bad english...


Re: Help Dj please :) - ChristolisTV - 23.12.2015

OK...

First of all, be more specific! xD


Re: Help Dj please :) - Adornil - 29.12.2015

so please share the code i will REP +


Re: Help Dj please :) - Adornil - 29.12.2015

please help


Re: Help Dj please :) - lucamsx - 29.12.2015

Are you using a dj system, or what? Tell us more details, we aren't wizards.


Re: Help Dj please :) - faff - 29.12.2015

Go back to the index page, click on the subforum that supports your language.
Give it a try and seek for your answer there.

You are not able to script, either you go check out some tutorials or either stick to playing servers instead of scripting one. This section is not ment to request scripts at all.


To answer your question:
Use the foreach plugin. (Optional: ZCMD)

Код:
	
CMD:djs(playerid, params[])
{
    if(PlayerInfo[playerid][pDJ] > 0)
    {
        SendClientMessage(playerid, COLOR_ORANGE, "DJ's Online:");
        foreach(Player, i)
	{
		if (PlayerInfo[i][pDJ] > 0)
		{
	                format(string, sizeof(string), "%s", GetPlayerName(i));
	                SendClientMessage(playerid, COLOR_WHITE, string);
		}
	}
     }
     return 1;
}