SA-MP Forums Archive
/factions command - 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: /factions command (/showthread.php?tid=600639)



/factions command - vrrp - 10.02.2016

Hello all , can someone can help me with a script ? I want a script which shows a dialog with factions , like you type /factions and will show you a list with all factions on server.
I want something like in following photo.

Thanks,
vrrp.




Re: /factions command - Joron - 10.02.2016

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/Dialog_Styles
https://sampwiki.blast.hk/wiki/OnDialogResponse
https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog


Re: /factions command - Crystallize - 10.02.2016

Код:
CMD:factions(playerid)
{
	new str[128];
	strcat(str,"0 - Civil \n1- Police Department \n and so on");
	ShowPlayerDialog(playerid,8348,DIALOG_STYLE_MSGBOX,"Factions List",str,"OK","");
	return 1;
}



Re: /factions command - vrrp - 11.02.2016

Quote:
Originally Posted by Wizzard2H
Посмотреть сообщение
Код:
CMD:factions(playerid)
{
	new str[128];
	strcat(str,"0 - Civil \n1- Police Department \n and so on");
	ShowPlayerDialog(playerid,8348,DIALOG_STYLE_MSGBOX,"Factions List",str,"OK","");
	return 1;
}
It works , but there is a problem , it shows just 5 factions . If i put more than 5 factions will appear just 5 on the list !


Re: /factions command - Godey - 11.02.2016

Код:
#include <zcmd>
#define DFactions 100001
Код:
CMD:factions(playerid, params[])
{
	new Factions[1280];
	strcat(Factions,"0 - Civil \n1- Police Department \n");
        strcat(Factions,"2 - F.B.I \n3- Medical Department \n");
        strcat(Factions,"4 - News Reporter \n5- Taxi Comapny\n");
        strcat(Factions,"6 - Hitman Agency\n7- Ballas Gang");
        strcat(Factions,"8 - Grove Street Family\n9 - Los Santos Vagos");
        strcat(Factions,"10 - Los Azectas Varios");
	ShowPlayerDialog(playerid,DFactions,DIALOG_STYLE_MSGBOX,"Factions List",Factions,"OK","");
	return 1;
}
Add color yourself.


Re: /factions command - vrrp - 13.02.2016

Quote:
Originally Posted by Godey
Посмотреть сообщение
Код:
#include <zcmd>
#define DFactions 100001
Код:
CMD:factions(playerid, params[])
{
	new Factions[1280];
	strcat(Factions,"0 - Civil \n1- Police Department \n");
        strcat(Factions,"2 - F.B.I \n3- Medical Department \n");
        strcat(Factions,"4 - News Reporter \n5- Taxi Comapny\n");
        strcat(Factions,"6 - Hitman Agency\n7- Ballas Gang");
        strcat(Factions,"8 - Grove Street Family\n9 - Los Santos Vagos");
        strcat(Factions,"10 - Los Azectas Varios");
	ShowPlayerDialog(playerid,DFactions,DIALOG_STYLE_MSGBOX,"Factions List",Factions,"OK","");
	return 1;
}
Add color yourself.
THANKS A LOT DUDE !! WORKED !