Turning Deathmatch off
#1

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
Reply
#2

Just put this at the top of your script:

pawn Код:
new deathmatch = 0;

Reply
#3

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

pawn Код:
new deathmatch = 0;

Thanks men
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)