Код:
if(dialogid == DIALOG_GIFTBOXOB)
{
if(!response) return 1;
{
new Float: pos[3]; new zzgQuery[0] = EOS;
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GiftBoxInfo[playerid][pGiftBoxOn] = 1;
SCM(playerid, -1, "Giftbox activated");
GiftBoxInfo[playerid][pGiftBoxPosX] = pos[0];
GiftBoxInfo[playerid][pGiftBoxPosY] = pos[1];
GiftBoxInfo[playerid][pGiftBoxPosZ] = pos[2];
GiftBoxInfo[playerid][pGiftboxModel] = CreateObject(strval(inputtext), GiftBoxInfo[playerid][pGiftBoxPosX], GiftBoxInfo[playerid][pGiftBoxPosY], GiftBoxInfo[playerid][pGiftBoxPosZ], 0.00000, 0.00000, 0.00000);
mysql_format(SQL, zzgQuery, sizeof(zzgQuery), "INSERT INTO giftboxd (`GiftBoxOn`, `GiftboxModel`, `GiftboxPosX`, `GiftboxPosY`, `GiftboxPosZ`) VALUES ('1','%d', '%f', '%f', '%f')",strval(inputtext), GiftBoxInfo[playerid][pGiftBoxPosX], GiftBoxInfo[playerid][pGiftBoxPosY], GiftBoxInfo[playerid][pGiftBoxPosZ]);
mysql_tquery(SQL, zzgQuery, "", "");
}
}