20.01.2019, 14:20
Quote:
//////
enum PDATA { pPolice, pskin, pweapon, pammo, pcolor, parmour } new pinfo[MAX_PLAYER][PDATA]; public OnPlayerDisconnect(playerid, reason) { if(pinfo[playerid][pPolice] = 1 || pinfo[playerid][pPolice] > 1) { new pweapon = GetPlayerWeapon(playerid);//weapon new pammo = GetPlayerAmmo(playerid);//ammo new pskin = GetPlayerSkin(playerid);//skin new pcolor = GetPlayerColor(playerid);//color new parmour = GetPlayerArmour(playerid new policelevel = pinfo[playerid][pPolice] ; mysql_format(policemod,128,"UPDATE 'Players' SET 'pPolice' = %i, 'pskin' = %i , 'pweapon' = %i , 'pammo' = %i , 'pcolor' = %i , 'parmour' = %i WHERE 'USERNAME' = %s" ,policelevel, pskin,pweapon,pammo,pcolor,parmour,pinfo[playerid][pname]); mysql_query(policemod); return 1; } } now data save if player dc and i must rtry this when he use cmd to save then load when he go off? and if player dc when are in duty table updated and last stats lost!and police stats will save at table and .... im confuse😥😅 |