Szerző Téma: Fegyverek elvétele  (Megtekintve 471 alkalommal)

Fegyverek elvétele
« Dátum: 2013. május 17. - 14:57:11 »
0 Show voters
Sziasztok!
A duty rendszerben mikor offdutyzok(kilépek a szolgálatból) nem veszi el tõlem a fegyvert, azt kéne, hogy eltünjön, tehát ne legyen nálam egy töltény se.
A duty az AfterLife-ról van.
 
   if(strcmp(cmd, \"/duty\", true) == 0 || strcmp(cmd, \"/duty\", true) == 0)
{
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
        if (!PlayerToPoint(5, playerid,274.6142,186.7879,1007.1719))
        {
            SendClientMessage(playerid, COLOR_WHITE, \"Nem vagy a rendõrségen.\");
            return 1;
    }
        if(OnDuty[playerid] == 0)
        {
           if(PlayerInfo[playerid][pSex] == 1)
           {
                     if(PlayerInfo[playerid][pRank] == 1) SetPlayerSkin(playerid, 71);
           if(PlayerInfo[playerid][pRank] == 2) SetPlayerSkin(playerid, 280);
           if(PlayerInfo[playerid][pRank] == 3) SetPlayerSkin(playerid, 266);
           if(PlayerInfo[playerid][pRank] == 4) SetPlayerSkin(playerid, 281);
           if(PlayerInfo[playerid][pRank] == 5) SetPlayerSkin(playerid, 267);
               if(PlayerInfo[playerid][pRank] == 6) SetPlayerSkin(playerid, 267);
           if(PlayerInfo[playerid][pRank] == 7) SetPlayerSkin(playerid, 265);
          if(PlayerInfo[playerid][pRank] == 8) SetPlayerSkin(playerid, 265);
           if(PlayerInfo[playerid][pRank] == 9) SetPlayerSkin(playerid, 282);
          if(PlayerInfo[playerid][pRank] == 10) SetPlayerSkin(playerid, 288);
       }
       if(PlayerInfo[playerid][pSex] == 2)
           {
              if(PlayerInfo[playerid][pRank] == 1) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 2) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 3) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 4) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 5) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 6) SetPlayerSkin(playerid, 233);
              if(PlayerInfo[playerid][pRank] == 7) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 8) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 9) SetPlayerSkin(playerid, 233);
          if(PlayerInfo[playerid][pRank] == 10) SetPlayerSkin(playerid, 233);
       }
              OnDuty[playerid] = 1;
      GivePlayerWeapon(playerid,24,100);
      GivePlayerWeapon(playerid,29,250);
        SetPlayerArmour(playerid,100);
         SendClientMessage(playerid, COLOR_WHITE, \"Szolgálatba léptél.\");
                GetPlayerName(playerid, sendername, sizeof(sendername));
   }
   else if(OnDuty[playerid] == 1)
   {
       SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a szolgálatból!\");
                OnDuty[playerid] = 0;
                SetPlayerArmour(playerid,0);
                PlayerInfo[playerid][pMaskuse] = 0;
   }
}
else SendClientMessage(playerid,COLOR_GRAD2, \"Nem vagy rendõr.\");
return 1;
}

Fegyverek elvétele
« Válasz #1 Dátum: 2013. május 17. - 15:20:22 »
0 Show voters
if(strcmp(cmd, \"/duty\", true) == 0 || strcmp(cmd, \"/duty\", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (!PlayerToPoint(5, playerid,274.6142,186.7879,1007.1719))
{
   SendClientMessage(playerid, COLOR_WHITE, \"Nem vagy a rendõrségen.\");
   return 1;
}
        if(OnDuty[playerid] == 0)
{
   if(PlayerInfo[playerid][pSex] == 1)
   {
      if(PlayerInfo[playerid][pRank] == 1) SetPlayerSkin(playerid, 71);
      if(PlayerInfo[playerid][pRank] == 2) SetPlayerSkin(playerid, 280);
      if(PlayerInfo[playerid][pRank] == 3) SetPlayerSkin(playerid, 266);
      if(PlayerInfo[playerid][pRank] == 4) SetPlayerSkin(playerid, 281);
      if(PlayerInfo[playerid][pRank] == 5) SetPlayerSkin(playerid, 267);
      if(PlayerInfo[playerid][pRank] == 6) SetPlayerSkin(playerid, 267);
      if(PlayerInfo[playerid][pRank] == 7) SetPlayerSkin(playerid, 265);
      if(PlayerInfo[playerid][pRank] == 8) SetPlayerSkin(playerid, 265);
      if(PlayerInfo[playerid][pRank] == 9) SetPlayerSkin(playerid, 282);
      if(PlayerInfo[playerid][pRank] == 10) SetPlayerSkin(playerid, 288);
   }
   if(PlayerInfo[playerid][pSex] == 2)
   {
      if(PlayerInfo[playerid][pRank] == 1) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 2) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 3) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 4) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 5) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 6) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 7) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 8) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 9) SetPlayerSkin(playerid, 233);
      if(PlayerInfo[playerid][pRank] == 10) SetPlayerSkin(playerid, 233);
   }
   OnDuty[playerid] = 1;
   GivePlayerWeapon(playerid,24,100);
   GivePlayerWeapon(playerid,29,250);
   SetPlayerArmour(playerid,100);
   SendClientMessage(playerid, COLOR_WHITE, \"Szolgálatba léptél.\");
   GetPlayerName(playerid, sendername, sizeof(sendername));
   }
   else if(OnDuty[playerid] == 1)
   {
      SendClientMessage(playerid, COLOR_WHITE, \"Kiléptél a szolgálatból!\");
      OnDuty[playerid] = 0;
      SetPlayerArmour(playerid,0);
      PlayerInfo[playerid][pMaskuse] = 0;
      ResetPlayerWeapons(playerid);
   }
}else SendClientMessage(playerid,COLOR_GRAD2, \"Nem vagy rendõr.\");
return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal