Weapons Save when /q +REP
#3

pawn Код:
#include <YSI\y_ini>

enum pInfo
{
    pwep1,
    pbullet1,
    pwep2,
    pbullet2,
    pwep3,
    pbullet3,
    pwep4,
    pbullet4,
    pwep5,
    pbullet5,
    pwep6,
    pbullet6
}

new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerConnect(playerid)
{
    INI_Int("wep1",PlayerInfo[playerid][pwep1]);
    INI_Int("bullet1",PlayerInfo[playerid][pbullet1]);
    INI_Int("wep2",PlayerInfo[playerid][pwep2]);
    INI_Int("bullet2",PlayerInfo[playerid][pbullet2]);
    INI_Int("wep3",PlayerInfo[playerid][pwep3]);
    INI_Int("bullet3",PlayerInfo[playerid][pbullet3]);
    INI_Int("wep4",PlayerInfo[playerid][pwep4]);
    INI_Int("bullet4",PlayerInfo[playerid][pbullet4]);
    INI_Int("wep5",PlayerInfo[playerid][pwep5]);
    INI_Int("bullet5",PlayerInfo[playerid][pbullet5]);
    INI_Int("wep6",PlayerInfo[playerid][pwep6]);
    INI_Int("bullet6",PlayerInfo[playerid][pbullet6]);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    INI_WriteInt(File,"wep1", PlayerInfo[playerid][pwep1]);
    INI_WriteInt(File,"bullet1", PlayerInfo[playerid][pbullet1]);
    INI_WriteInt(File,"wep2", PlayerInfo[playerid][pwep2]);
    INI_WriteInt(File,"bullet2", PlayerInfo[playerid][pbullet2]);
    INI_WriteInt(File,"wep3", PlayerInfo[playerid][pwep3]);
    INI_WriteInt(File,"bullet3", PlayerInfo[playerid][pbullet3]);
    INI_WriteInt(File,"wep4", PlayerInfo[playerid][pwep4]);
    INI_WriteInt(File,"bullet4", PlayerInfo[playerid][pbullet4]);
    INI_WriteInt(File,"wep5", PlayerInfo[playerid][pwep5]);
    INI_WriteInt(File,"bullet5", PlayerInfo[playerid][pbullet5]);
    INI_WriteInt(File,"wep6", PlayerInfo[playerid][pwep6]);
    INI_WriteInt(File,"bullet6", PlayerInfo[playerid][pbullet6]);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pwep1], PlayerInfo[playerid][pbullet1]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pwep2], PlayerInfo[playerid][pbullet2]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pwep3], PlayerInfo[playerid][pbullet3]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pwep4], PlayerInfo[playerid][pbullet4]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pwep5], PlayerInfo[playerid][pbullet5]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pwep6], PlayerInfo[playerid][pbullet6]);
    return 1;
}
Reply


Messages In This Thread
Weapons Save when /q +REP - by RenSoprano - 17.07.2012, 09:41
Re: Weapons Save when /q +REP - by XStormiest - 17.07.2012, 09:59
Re: Weapons Save when /q +REP - by Matz - 17.07.2012, 10:07
Re: Weapons Save when /q +REP - by RenSoprano - 17.07.2012, 10:39
Re: Weapons Save when /q +REP - by Matz - 17.07.2012, 10:45
Re: Weapons Save when /q +REP - by RenSoprano - 17.07.2012, 10:59
Re: Weapons Save when /q +REP - by Matz - 17.07.2012, 11:06
Re: Weapons Save when /q +REP - by detter - 17.07.2012, 11:46
Re: Weapons Save when /q +REP - by RenSoprano - 17.07.2012, 11:49

Forum Jump:


Users browsing this thread: 1 Guest(s)