SA-MP Forums Archive
Take the weapons || Newbie Question - 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: Take the weapons || Newbie Question (/showthread.php?tid=514514)



Take the weapons || Newbie Question - Le3aT - 22.05.2014

Alright, I made a /dm place, named the string and everything but there is a problem, I want him to not submit any command before leaving the /dm (/leave), And it will take his weapons and armour. Thanks in advance.


Re: Take the weapons || Newbie Question - Abagail - 22.05.2014

If your using ZCMD,

pawn Код:
public OnPlayerCommandRecieved(playerid, cmdtext[])
{
if(!IsPlayerAdmin && DM[playerid] == 1 && strcmp(cmdtext, "/dm",false) {
SendClientMessage(playerid, -1, "You cannot use commands whilst in the DM arena.");
return 0;
else return 1;
}
pawn Код:
CMD:leave(playerid, params[])
{
if(DM[playerid] == 0) return 0;
DM[playerid] == 0;
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0.0);
return 1;
}

Untested.



Re: Take the weapons || Newbie Question - Le3aT - 22.05.2014

I want the normal one, Please