Szerző Téma: Fegyver Mentés  (Megtekintve 447 alkalommal)

Fegyver Mentés
« Dátum: 2016. Szeptember 05. - 18:53:06 »
0 Show voters
Sziasztok, rendben sikerült megoldani de így most egyes fegyvereket nem ment ilyen pl. a 9mm(22-es ID)
 

stock GivePlayerServerWeapon(playerid, weapid, ammo)
{
    new gunname[32];
    GivePlayerWeapon(playerid, weapid, ammo);
    GetWeaponName(weapid, gunname, sizeof(gunname));
    SetPVarInt(playerid, gunname, 1);
        GetPlayerName(playerid,Nev,sizeof(Nev));
format(str, 128, \"Karik/%s.ini\", Nev);
if(Belepve[playerid] == 1)
{
dfile_Open(str);
//
    dfile_WriteInt(\"Brass Knuckles\", GetPVarInt(playerid, \"Brass Knuckles\"));
    dfile_WriteInt(\"Golf Club\", GetPVarInt(playerid, \"Golf Club\"));
    dfile_WriteInt(\"Nightstick\", GetPVarInt(playerid, \"Nightstick\"));
    dfile_WriteInt(\"Knife\", GetPVarInt(playerid, \"Knife\"));
    dfile_WriteInt(\"Baseball Bat\", GetPVarInt(playerid, \"Baseball Bat\"));
    dfile_WriteInt(\"Shovel\", GetPVarInt(playerid, \"Shovel\"));
    dfile_WriteInt(\"Pool Cue\", GetPVarInt(playerid, \"Pool Cue\"));
    dfile_WriteInt(\"Katana\", GetPVarInt(playerid, \"Katana\"));
    dfile_WriteInt(\"Chainsaw\", GetPVarInt(playerid, \"Chainsaw\"));
    dfile_WriteInt(\"Purple Dildo\", GetPVarInt(playerid, \"Purple Dildo\"));
    dfile_WriteInt(\"Dildo\", GetPVarInt(playerid, \"Dildo\"));
    dfile_WriteInt(\"Vibrator\", GetPVarInt(playerid, \"Vibrator\"));
    dfile_WriteInt(\"Silver Vibrator\", GetPVarInt(playerid, \"Silver Vibrator\"));
    dfile_WriteInt(\"Flowers\", GetPVarInt(playerid, \"Flowers\"));
    dfile_WriteInt(\"Cane\", GetPVarInt(playerid, \"Cane\"));
    dfile_WriteInt(\"Grenade\", GetPVarInt(playerid, \"Grenade\"));
    dfile_WriteInt(\"Tear Gas\", GetPVarInt(playerid, \"Tear Gas\"));
    dfile_WriteInt(\"Molotov Cocktail\", GetPVarInt(playerid, \"Molotov Cocktail\"));
    dfile_WriteInt(\"9mm\", GetPVarInt(playerid, \"9mm\"));
    dfile_WriteInt(\"Silenced 9mm\", GetPVarInt(playerid, \"Silenced 9mm\"));
    dfile_WriteInt(\"Desert Eagle\", GetPVarInt(playerid, \"Desert Eagle\"));
    dfile_WriteInt(\"Shotgun\", GetPVarInt(playerid, \"Shotgun\"));
    dfile_WriteInt(\"Sawnoff Shotgun\", GetPVarInt(playerid, \"Sawnoff Shotgun\"));
    dfile_WriteInt(\"Combat Shotgun\", GetPVarInt(playerid, \"Combat Shotgun\"));
    dfile_WriteInt(\"Micro SMG/Uzi\", GetPVarInt(playerid, \"Micro SMG/Uzi\"));
    dfile_WriteInt(\"MP5\", GetPVarInt(playerid, \"MP5\"));
    dfile_WriteInt(\"AK-47\", GetPVarInt(playerid, \"AK-47\"));
    dfile_WriteInt(\"M4\", GetPVarInt(playerid, \"M4\"));
    dfile_WriteInt(\"Tec-9\", GetPVarInt(playerid, \"Tec-9\"));
    dfile_WriteInt(\"Country Rifle\", GetPVarInt(playerid, \"Country Rifle\"));
    dfile_WriteInt(\"Sniper Rifle\", GetPVarInt(playerid, \"Sniper Rifle\"));
    dfile_WriteInt(\"RPG\", GetPVarInt(playerid, \"RPG\"));
    dfile_WriteInt(\"HS Rocket\", GetPVarInt(playerid, \"HS Rocket\"));
    dfile_WriteInt(\"Flamethrower\", GetPVarInt(playerid, \"Flamethrower\"));
    dfile_WriteInt(\"Minigun\", GetPVarInt(playerid, \"Minigun\"));
    dfile_WriteInt(\"Satchel Charge\", GetPVarInt(playerid, \"Satchel Charge\"));
    dfile_WriteInt(\"Detonator\", GetPVarInt(playerid, \"Detonator\"));
    dfile_WriteInt(\"Spraycan\", GetPVarInt(playerid, \"Spraycan\"));
    dfile_WriteInt(\"Fire Extinguisher\", GetPVarInt(playerid, \"Fire Extinguisher\"));
    dfile_WriteInt(\"Camera\", GetPVarInt(playerid, \"Camera\"));
    dfile_WriteInt(\"Night Vis Goggles\", GetPVarInt(playerid, \"Night Vis Goggles\"));
    dfile_WriteInt(\"Thermal Goggles\", GetPVarInt(playerid, \"Thermal Goggles\"));
    dfile_WriteInt(\"Parachute\", GetPVarInt(playerid, \"Parachute\"));
//
dfile_SaveFile();
dfile_CloseFile();
}
}

 
OnplayerSpawn:
 
    GetPlayerName(playerid,Nev,sizeof(Nev));
format(str, 128, \"Karik/%s.ini\", Nev);
if(Belepve[playerid] == 1)
{
dfile_Open(str);
//
                SetPVarInt(playerid, \"Brass Knuckles\", dfile_ReadInt(\"Brass Knuckles\"));
                SetPVarInt(playerid, \"Golf Club\", dfile_ReadInt(\"Golf Club\"));
                SetPVarInt(playerid, \"Nightstick\", dfile_ReadInt(\"Nightstick\"));
                SetPVarInt(playerid, \"Knife\", dfile_ReadInt(\"Knife\"));
                SetPVarInt(playerid, \"Baseball Bat\", dfile_ReadInt(\"Baseball Bat\"));
                SetPVarInt(playerid, \"Shovel\", dfile_ReadInt(\"Shovel\"));
                SetPVarInt(playerid, \"Pool Cue\", dfile_ReadInt(\"Pool Cue\"));
                SetPVarInt(playerid, \"Shovel\", dfile_ReadInt(\"Shovel\"));
                SetPVarInt(playerid, \"Katana\", dfile_ReadInt(\"Katana\"));
                SetPVarInt(playerid, \"Chainsaw\", dfile_ReadInt(\"Chainsaw\"));
                SetPVarInt(playerid, \"Purple Dildo\", dfile_ReadInt(\"Purple Dildo\"));
                SetPVarInt(playerid, \"Dildo\", dfile_ReadInt(\"Dildo\"));
                SetPVarInt(playerid, \"Vibrator\", dfile_ReadInt(\"Vibrator\"));
                SetPVarInt(playerid, \"Silver Vibrator\", dfile_ReadInt(\"Silver Vibrator\"));
                SetPVarInt(playerid, \"Flowers\", dfile_ReadInt(\"Flowers\"));
                SetPVarInt(playerid, \"Cane\", dfile_ReadInt(\"Cane\"));
                SetPVarInt(playerid, \"Tear Gas\", dfile_ReadInt(\"Tear Gas\"));
                SetPVarInt(playerid, \"RPG\", dfile_ReadInt(\"RPG\"));
                SetPVarInt(playerid, \"HS Rocket\", dfile_ReadInt(\"HS Rocket\"));
                SetPVarInt(playerid, \"Flamethrower\", dfile_ReadInt(\"Flamethrower\"));
                SetPVarInt(playerid, \"Satchel Charge\", dfile_ReadInt(\"Satchel Charge\"));
                SetPVarInt(playerid, \"Spraycan\", dfile_ReadInt(\"Spraycan\"));
                SetPVarInt(playerid, \"Fire Extinguisher\", dfile_ReadInt(\"Fire Extinguisher\"));
                SetPVarInt(playerid, \"Camera\", dfile_ReadInt(\"Camera\"));
                SetPVarInt(playerid, \"Night Vis Goggles\", dfile_ReadInt(\"Night Vis Goggles\"));
                SetPVarInt(playerid, \"Thermal Goggles\", dfile_ReadInt(\"Thermal Goggles\"));
                SetPVarInt(playerid, \"Grenade\", dfile_ReadInt(\"Grenade\"));
                SetPVarInt(playerid, \"Molotov Cocktail\", dfile_ReadInt(\"Molotov Cocktail\"));
                SetPVarInt(playerid, \"9mm\", dfile_ReadInt(\"9mm\"));
                SetPVarInt(playerid, \"Silenced 9mm\", dfile_ReadInt(\"Silenced 9mm\"));
                SetPVarInt(playerid, \"Desert Eagle\", dfile_ReadInt(\"Desert Eagle\"));
                SetPVarInt(playerid, \"Shotgun\", dfile_ReadInt(\"Shotgun\"));
                SetPVarInt(playerid, \"Sawn-off Shotgun\", dfile_ReadInt(\"Sawn-off Shotgun\"));
                SetPVarInt(playerid, \"Combat Shotgun\", dfile_ReadInt(\"Combat Shotgun\"));
                SetPVarInt(playerid, \"Micro SMG/Uzi\", dfile_ReadInt(\"Micro SMG/Uzi\"));
                SetPVarInt(playerid, \"MP5\", dfile_ReadInt(\"MP5\"));
                SetPVarInt(playerid, \"AK-47\", dfile_ReadInt(\"AK-47\"));
                SetPVarInt(playerid, \"M4\", dfile_ReadInt(\"M4\"));
                SetPVarInt(playerid, \"Tec-9\", dfile_ReadInt(\"Tec-9\"));
                SetPVarInt(playerid, \"Country Rifle\", dfile_ReadInt(\"Country Rifle\"));
                SetPVarInt(playerid, \"Sniper Rifle\", dfile_ReadInt(\"Sniper Rifle\"));
                SetPVarInt(playerid, \"Minigun\", dfile_ReadInt(\"Minigun\"));
//
dfile_SaveFile();
dfile_CloseFile();
}
    if( GetPVarInt( playerid, \"Brass Knuckles\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 1, 900000);
    }
    if( GetPVarInt( playerid, \"Golf Club\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 2, 900000);
    }
    if( GetPVarInt( playerid, \"Nightstick\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 3, 900000);
    }
    if( GetPVarInt( playerid, \"Knife\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 4, 900000);
    }
    if( GetPVarInt( playerid, \"Baseball Bat\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 5, 900000);
    }
    if( GetPVarInt( playerid, \"Shovel\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 6, 900000);
    }
    if( GetPVarInt( playerid, \"Pool Cue\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 7, 900000);
    }
    if( GetPVarInt( playerid, \"Katana\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 8, 900000);
    }
    if( GetPVarInt( playerid, \"Chainsaw\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 9, 900000);
    }
    if( GetPVarInt( playerid, \"Purple Dildo\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 10, 900000);
    }
    if( GetPVarInt( playerid, \"Dildo\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 11, 900000);
    }
    if( GetPVarInt( playerid, \"Vibrator\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 12, 900000);
    }
    if( GetPVarInt( playerid, \"Silver Vibrator\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 13, 900000);
    }
    if( GetPVarInt( playerid, \"Flowers\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 14, 900000);
    }
    if( GetPVarInt( playerid, \"Cane\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 15, 900000);
    }
    if( GetPVarInt( playerid, \"Grenade\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 16, 900000);
    }
    if( GetPVarInt( playerid, \"Tear Gas\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 17, 900000);
    }
    if( GetPVarInt( playerid, \"Molotov Cocktail\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 18, 900000);
    }
    if( GetPVarInt( playerid, \"9mm\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 22, 9000);
    }
    if( GetPVarInt( playerid, \"Silenced 9mm\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 23, 9000);
    }
    if( GetPVarInt( playerid, \"Desert Eagle\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 24, 9000);
    }
    if( GetPVarInt( playerid, \"Shotgun\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 25, 900000);
    }
    if( GetPVarInt( playerid, \"Sawnoff Shotgun\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 26, 900000);
    }
    if( GetPVarInt( playerid, \"Combat Shotgun\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 27, 900000);
    }
    if( GetPVarInt( playerid, \"Micro SMG/Uzi\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 28, 900000);
    }
    if( GetPVarInt( playerid, \"MP5\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 29, 900000);
    }
    if( GetPVarInt( playerid, \"AK-47\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 30, 900000);
    }
    if( GetPVarInt( playerid, \"M4\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 31, 900000);
    }
    if( GetPVarInt( playerid, \"Tec-9\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 32, 900000);
    }
    if( GetPVarInt( playerid, \"Country Rifle\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 33, 900000);
    }
    if( GetPVarInt( playerid, \"Sniper Rifle\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 34, 900000);
    }
    if( GetPVarInt( playerid, \"RPG\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 35, 900000);
    }
    if( GetPVarInt( playerid, \"HS Rocket\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 36, 900000);
    }
    if( GetPVarInt( playerid, \"Flamethrower\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 37, 900000);
    }
    if( GetPVarInt( playerid, \"Minigun\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 38, 900000);
    }
    if( GetPVarInt( playerid, \"Satchel Charge\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 39, 900000);
    }
    if( GetPVarInt( playerid, \"Detonator\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 40, 900000);
    }
    if( GetPVarInt( playerid, \"Spraycan\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 41, 900000);
    }
    if( GetPVarInt( playerid, \"Fire Extinguisher\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 42, 900000);
    }
    if( GetPVarInt( playerid, \"Camera\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 43, 900000);
    }
    if( GetPVarInt( playerid, \"Night Vis Goggles\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 44, 900000);
    }
    if( GetPVarInt( playerid, \"Thermal Goggles\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 45, 900000);
    }
    if( GetPVarInt( playerid, \"Parachute\" ) == 1 )
{
    GivePlayerServerWeapon(playerid, 46, 900000);
    }

 
OnPlayerDisconnect:
 
   if(Belepve[playerid] == 1)
{
dfile_Open(str);
    dfile_WriteInt(\"Brass Knuckles\", GetPVarInt(playerid, \"Brass Knuckles\"));
    dfile_WriteInt(\"Golf Club\", GetPVarInt(playerid, \"Golf Club\"));
    dfile_WriteInt(\"Nightstick\", GetPVarInt(playerid, \"Nightstick\"));
    dfile_WriteInt(\"Knife\", GetPVarInt(playerid, \"Knife\"));
    dfile_WriteInt(\"Baseball Bat\", GetPVarInt(playerid, \"Baseball Bat\"));
    dfile_WriteInt(\"Shovel\", GetPVarInt(playerid, \"Shovel\"));
    dfile_WriteInt(\"Pool Cue\", GetPVarInt(playerid, \"Pool Cue\"));
    dfile_WriteInt(\"Katana\", GetPVarInt(playerid, \"Katana\"));
    dfile_WriteInt(\"Chainsaw\", GetPVarInt(playerid, \"Chainsaw\"));
    dfile_WriteInt(\"Purple Dildo\", GetPVarInt(playerid, \"Purple Dildo\"));
    dfile_WriteInt(\"Dildo\", GetPVarInt(playerid, \"Dildo\"));
    dfile_WriteInt(\"Vibrator\", GetPVarInt(playerid, \"Vibrator\"));
    dfile_WriteInt(\"Silver Vibrator\", GetPVarInt(playerid, \"Silver Vibrator\"));
    dfile_WriteInt(\"Flowers\", GetPVarInt(playerid, \"Flowers\"));
    dfile_WriteInt(\"Cane\", GetPVarInt(playerid, \"Cane\"));
    dfile_WriteInt(\"Grenade\", GetPVarInt(playerid, \"Grenade\"));
    dfile_WriteInt(\"Tear Gas\", GetPVarInt(playerid, \"Tear Gas\"));
    dfile_WriteInt(\"Molotov Cocktail\", GetPVarInt(playerid, \"Molotov Cocktail\"));
    dfile_WriteInt(\"9mm\", GetPVarInt(playerid, \"9mm\"));
    dfile_WriteInt(\"Silenced 9mm\", GetPVarInt(playerid, \"Silenced 9mm\"));
    dfile_WriteInt(\"Desert Eagle\", GetPVarInt(playerid, \"Desert Eagle\"));
    dfile_WriteInt(\"Shotgun\", GetPVarInt(playerid, \"Shotgun\"));
    dfile_WriteInt(\"Sawnoff Shotgun\", GetPVarInt(playerid, \"Sawnoff Shotgun\"));
    dfile_WriteInt(\"Combat Shotgun\", GetPVarInt(playerid, \"Combat Shotgun\"));
    dfile_WriteInt(\"Micro SMG/Uzi\", GetPVarInt(playerid, \"Micro SMG/Uzi\"));
    dfile_WriteInt(\"MP5\", GetPVarInt(playerid, \"MP5\"));
    dfile_WriteInt(\"AK-47\", GetPVarInt(playerid, \"AK-47\"));
    dfile_WriteInt(\"M4\", GetPVarInt(playerid, \"M4\"));
    dfile_WriteInt(\"Tec-9\", GetPVarInt(playerid, \"Tec-9\"));
    dfile_WriteInt(\"Country Rifle\", GetPVarInt(playerid, \"Country Rifle\"));
    dfile_WriteInt(\"Sniper Rifle\", GetPVarInt(playerid, \"Sniper Rifle\"));
    dfile_WriteInt(\"RPG\", GetPVarInt(playerid, \"RPG\"));
    dfile_WriteInt(\"HS Rocket\", GetPVarInt(playerid, \"HS Rocket\"));
    dfile_WriteInt(\"Flamethrower\", GetPVarInt(playerid, \"Flamethrower\"));
    dfile_WriteInt(\"Minigun\", GetPVarInt(playerid, \"Minigun\"));
    dfile_WriteInt(\"Satchel Charge\", GetPVarInt(playerid, \"Satchel Charge\"));
    dfile_WriteInt(\"Detonator\", GetPVarInt(playerid, \"Detonator\"));
    dfile_WriteInt(\"Spraycan\", GetPVarInt(playerid, \"Spraycan\"));
    dfile_WriteInt(\"Fire Extinguisher\", GetPVarInt(playerid, \"Fire Extinguisher\"));
    dfile_WriteInt(\"Camera\", GetPVarInt(playerid, \"Camera\"));
    dfile_WriteInt(\"Night Vis Goggles\", GetPVarInt(playerid, \"Night Vis Goggles\"));
    dfile_WriteInt(\"Thermal Goggles\", GetPVarInt(playerid, \"Thermal Goggles\"));
    dfile_WriteInt(\"Parachute\", GetPVarInt(playerid, \"Parachute\"));
//
dfile_SaveFile();
dfile_CloseFile();

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal