War System - 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: War System (
/showthread.php?tid=338609)
War System -
Edin Black - 30.04.2012
Hi, I will have a war sistem with commands: /startwar [Lider] and /acceptwar
Detalis of war sistem: When a leader use command /startwar, he ask another Leader if they want to start war. The asked ally need to use /acceptwar for the war begin. Is ok, but it doesn't end and ally don't receive award. If I kill one opponent in the other team, then I look in the /score of how much it is
Pls give me that
Re: War System -
CoaPsyFactor - 30.04.2012
that is not complicated script, you should start learning pawn

:P
Re: War System -
Phyrunx - 30.04.2012
Make it By your own self
Its easy
Re: War System -
Edin Black - 30.04.2012
Quote:
Originally Posted by Phyrunx
Make it By your own self
Its easy
|
Hmm.. i can not.
For me itґs to hard, can you make me the "Filterscript".
Re: War System -
Kitten - 30.04.2012
pawn Код:
#include <a_samp>
#include <sscanf2>
#include <zcmd>
main()
{
}
CMD:war(playerid,params[])
{
new targetid,name[24],targetname[24],stringtwo[128];
if(sscanf(params,"u",targetid))
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Player is not online");
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(targetid,targetname,sizeof(targetname));
format(stringtwo,sizeof(stringtwo), "Player %s wants to start a war with you.", name);
ShowPlayerDialog(targetid,0,DIALOG_STYLE_MSGBOX,"War",stringtwo,"Accept","Deny");
format(stringtwo,sizeof(stringtwo), "War request sent to %s", targetname);
SendClientMessage(playerid,-1,stringtwo);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0)
{
if(response)
{
GameTextForPlayer(playerid,"~r~ War Started",2000,4);
// Your dm stuff or what every you want when the player accepts the war.
}
if(!response)
{
// Whatever you want when the player denys.
}
}
return 1;
}
Should start you off You need ZCMD and sscanf.
Re: War System -
Edin Black - 30.04.2012
Ok, i have zcmd and sccanf
but what is the command to start/accept the war ?
And works that with /score and kills ?
Help me pls
Re: War System -
Edin Black - 30.04.2012
Can anyone help me ?