SA-MP Forums Archive
Turning Deathmatch off - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Turning Deathmatch off (/showthread.php?tid=129001)



Turning Deathmatch off - juuleman - 20.02.2010

Hey all,

I have a question.
At our server we have an automatic DM mission but we dont like it so many times we just turn it off. (an admin does /deathmatch 0)

Isnt it possible to automaticly turn the DM off?
The code from /deathmatch is:
Код:
	if (strcmp(cmd, "/deathmatch", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /deathmatch [0-1] This mission on 1 off 0");
			format(string, sizeof(string), "cb:%d sr:%d hw:%d dm:%d", cashbox,streetrace,hotwire,deathmatch);
			SendClientMessage(playerid, COLOR_GRAD1, string);
			return 1;
		}
		new weaponid = strval(tmp);
		if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 3)
		{
			deathmatch=weaponid;
			format(string, sizeof(string), "cb:%d sr:%d hw:%d dm:%d", cashbox,streetrace,hotwire,deathmatch);
			SendClientMessage(playerid, COLOR_GRAD1, string);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
		}
Someone please help me.

SancheZ


Re: Turning Deathmatch off - DiMeNsIoN© - 20.02.2010

Just put this at the top of your script:

pawn Код:
new deathmatch = 0;




Re: Turning Deathmatch off - juuleman - 20.02.2010

Quote:
Originally Posted by DiMeNsIoN©
Just put this at the top of your script:

pawn Код:
new deathmatch = 0;

Thanks men


Re: Turning Deathmatch off - DiMeNsIoN© - 20.02.2010

Quote:
Originally Posted by [ECR
SancheZ ]
Thanks men
No problem