04.02.2010, 08:03
Hello i want it like it saves your duty position, etc if duty is 1 (on) when you disconnected you will return on duty, can anyone help me as it doesnt seems like it worked the thing i tried out..
Код:
public OnPlayerDisconnect(playerid, reason) { gActivePlayers[playerid]--; numplayers--; if(reason == 0) { PlayerInfo[playerid][pCrashed] = 1; } if(OnDuty[playerid]==1) { OnDuty[playerid] = 1; } for(new slot = 0; slot != 12; slot++) { new wep, ammo; GetPlayerWeaponData(playerid, slot, wep, ammo); if(wep != 0 && ammo != 0) { if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; } else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; } else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; } else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; } } }