21.04.2018, 16:50
(
Последний раз редактировалось ScottMcBean; 22.04.2018 в 09:03.
)
Hello every one im facting a problem. when i create an entrance in my server it show's the ID Like this
But on the DB i see id 0 so like that all entrances are commited that is bugged these are the codes
And this the entrances mysql input
Even if i create another entrance the ID 0 and the bug the interiors are commited
But on the DB i see id 0 so like that all entrances are commited that is bugged these are the codes
PHP код:
forward OnAdminCreateEntrance(playerid, entranceid, name[], Float:x, Float:y, Float:z, Float:angle);
public OnAdminCreateEntrance(playerid, entranceid, name[], Float:x, Float:y, Float:z, Float:angle)
{
strcpy(EntranceInfo[entranceid][eOwner], "Nobody", MAX_PLAYER_NAME);
strcpy(EntranceInfo[entranceid][eName], name, 40);
strcpy(EntranceInfo[entranceid][ePassword], "None", 64);
EntranceInfo[entranceid][eExists] = 1;
EntranceInfo[entranceid][eID] = cache_insert_id(connectionID);
EntranceInfo[entranceid][eOwnerID] = 0;
EntranceInfo[entranceid][eIcon] = 1239;
EntranceInfo[entranceid][eLocked] = 0;
EntranceInfo[entranceid][eRadius] = 3.0;
EntranceInfo[entranceid][ePosX] = x;
EntranceInfo[entranceid][ePosY] = y;
EntranceInfo[entranceid][ePosZ] = z;
EntranceInfo[entranceid][ePosA] = angle;
EntranceInfo[entranceid][eIntX] = 0.0;
EntranceInfo[entranceid][eIntY] = 0.0;
EntranceInfo[entranceid][eIntZ] = 0.0;
EntranceInfo[entranceid][eIntA] = 0.0;
EntranceInfo[entranceid][eInterior] = 0;
EntranceInfo[entranceid][eWorld] = EntranceInfo[entranceid][eID] + 4000000;
EntranceInfo[entranceid][eOutsideInt] = GetPlayerInterior(playerid);
EntranceInfo[entranceid][eOutsideVW] = GetPlayerVirtualWorld(playerid);
EntranceInfo[entranceid][eAdminLevel] = 0;
EntranceInfo[entranceid][eFactionType] = FACTION_NONE;
EntranceInfo[entranceid][eGang] = -1;
EntranceInfo[entranceid][eVIP] = 0;
EntranceInfo[entranceid][eVehicles] = 0;
EntranceInfo[entranceid][eFreeze] = 0;
EntranceInfo[entranceid][eLabel] = 1;
EntranceInfo[entranceid][eType] = 0;
EntranceInfo[entranceid][eMapIcon] = 0;
EntranceInfo[entranceid][eText] = Text3D:INVALID_3DTEXT_ID;
EntranceInfo[entranceid][ePickup] = -1;
EntranceInfo[entranceid][eMapIconID] = -1;
EntranceInfo[entranceid][eColor] = -256;
Iter_Add(Entrance, entranceid);
mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET world = %i WHERE id = %i", EntranceInfo[entranceid][eWorld], EntranceInfo[entranceid][eID]);
mysql_tquery(connectionID, queryBuffer);
ReloadEntrance(entranceid);
SendClientMessageEx(playerid, COLOR_GREEN, "** Entrance %i created successfully.", entranceid);
}
PHP код:
CREATE TABLE `entrances` (
`id` int(10) NOT NULL,
`ownerid` int(10) DEFAULT '0',
`owner` varchar(24) DEFAULT NULL,
`name` varchar(40) DEFAULT NULL,
`iconid` smallint(5) DEFAULT '1239',
`locked` tinyint(1) DEFAULT '0',
`radius` float DEFAULT '3',
`pos_x` float DEFAULT '0',
`pos_y` float DEFAULT '0',
`pos_z` float DEFAULT '0',
`pos_a` float DEFAULT '0',
`int_x` float DEFAULT '0',
`int_y` float DEFAULT '0',
`int_z` float DEFAULT '0',
`int_a` float DEFAULT '0',
`interior` tinyint(2) DEFAULT '0',
`world` int(10) DEFAULT '0',
`outsideint` tinyint(2) DEFAULT '0',
`outsidevw` int(10) DEFAULT '0',
`adminlevel` tinyint(2) DEFAULT '0',
`factiontype` tinyint(2) DEFAULT '0',
`vip` tinyint(2) DEFAULT '0',
`vehicles` tinyint(1) DEFAULT '0',
`freeze` tinyint(1) DEFAULT '0',
`password` varchar(64) DEFAULT 'None',
`label` tinyint(1) DEFAULT '1',
`mapicon` tinyint(3) NOT NULL DEFAULT '0',
`gang` tinyint(2) DEFAULT '-1',
`type` tinyint(2) DEFAULT '0',
`color` int(10) DEFAULT '-256'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;