Why people using variables like that?
#2

here is 1 example of [MAX_PLAYERS]

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;
 }
by using InDm we can also create leave dm command.. i hope it helped you a bit.
Reply


Messages In This Thread
Why people using variables like that? - by Activest - 28.04.2013, 06:40
Re: Why people using variables like that? - by verlaj - 28.04.2013, 07:08
AW: Why people using variables like that? - by BigETI - 28.04.2013, 07:21

Forum Jump:


Users browsing this thread: 1 Guest(s)