Jump to content

I O B I T

Membru
  • Posts

    124
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by I O B I T

  1. pui asta la onplayerconnect   si onplayerlogin

     

        if(NumIp(playerip, playerid) >= 3 && !IsBotOnIP(playerip))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "There are already 2 players connected with same IP.");
             KickEx(playerid);
             return 1;
        }

     

     

    function NumIp(ip[], playerid)
    {
         new ips = 0;
          foreach(new i : Player)
         {
              if(i == playerid) continue;
              new playerip[16];
              GetPlayerIp(i,playerip,sizeof(playerip));
            if(strmatch(ip, playerip)) ips++;
         }
         return ips;
    }

     

    si aia

     

     

  2. pune la public OnVehicleDeath(vehicleid)     urmatoarele 

     

         new engine,lights,alarm,doors,bonnet,boot,objective;
         vehEngine[vehicleid] = 0;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
         SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
        if(IsAnOwnableCar(vehicleid))
         {
            foreach(new i : Player)
            {
                for(new v; v < MAX_PERSONAL_VEHICLES; v++)
                {
                    if(PlayerInfo[pCarID][v] == vehicleid)
                    {
                        PlayerInfo[pCarHP][v] = 1000.0;
                        if(PlayerInfo[pCarIns][v] != 0)
                        {
                            PlayerInfo[pCarIns][v]--;
                        }
                        cUpdate(i, v, cInsurancecarx);
                        cUpdate(i, v, cKMx);
                        cUpdate(i, v, cHPx);
                    }
                }
            }
         }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.