19.06.2013, 17:09
PHP код:
Top of your script:
new InDM[MAX_PLAYERS];
Under onplayerconnect:
InDM[playerid] = 0;
Under onplayerspawn:
InDM[playerid] = 0;
If he is in DM and uses the command, add this line to your cmd.
CMD:test(playerid,params[])
{
if(InDM[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cant use commands in DM");
return 1;
}
It sets him to DMZone with InDM[playerid]=1;
CMD:dm(playerid,params[])
{
if(InDM[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cant use commands in DM");
GivePlayerWeapon(playerid, 24,500);
GivePlayerWeapon(playerid,25,500);
InDM[playerid]=1;
return 1;
}