28.04.2013, 07:08
here is 1 example of [MAX_PLAYERS]
by using InDm we can also create leave dm command.. i hope it helped you a bit.
pawn Код:
new InDM[MAX_PLAYERS];
CMD:dm1(playerid,Params[])
{
if(InDM[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You are already in DM."); //to check if player is already in that dm or not
SetPlayerPos(playerid, 1541.4945,-1342.2010,329.4573);
SendClientMessage(playerid,COLOR_RED,"Star tower DM");
GetPlayerWeapon(playerid);
GivePlayerWeapon(playerid,24,1000);
GivePlayerWeapon(playerid,25,1000);
SetPlayerArmour(playerid, 100);
InDM[playerid] = 1; //this will tell that player is now in dm.
return 1;
}