Command for gang
#1

Quote:

if(strcmp(cmd, "/equip", true) == 0)
{
if(PlayerToPoint(100,playerid, 2570.8425,-1285.0020,1065.3672))
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
return 1;
}

How can i make taht only " PlayerInfo[playerid][pMember] == 5 " can use taht command ? And if others use it should send message that he is not allowed to use that cmd

Pls help

Thanks
Reply
#2

pawn Код:
if(strcmp(cmd, "/equip", true) == 0)
{
  if(PlayerInfo[playerid][pMember] == 5)
  {
    if(PlayerToPoint(100.0, playerid, 2570.8425, -1285.0020, 1065.3672))
    {
      SetPlayerHealth(playerid, 100);
      SetPlayerArmour(playerid, 100);
    }
  }
  else SendClientMessage(playerid, 0xFFFFFFFF, "You're not allowed to use this command.");
  return true;
}
I suggest to you to start using IsPlayerInRangeOfPoint function and zcmd command processor.
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)