Better with
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsEntityDead(PlayerPedId()) then
RegisterNetEvent("item:Reset")
TriggerServerEvent("item:Reset")
end
end
end)
There is an extra “end” that serves no purpose
1 Like
Oops, i’ll fix it in my file, thx.
1 Like
Not work db mysql :
Erreur
Requête SQL :
CREATE TABLE `user_inventory` (
`user_id` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`item_id` int(11) unsigned NOT NULL,
`quantity` int(11) DEFAULT NULL,
PRIMARY KEY (`user_id`,`item_id`),
KEY `item_id` (`item_id`),
CONSTRAINT `user_inventory_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`identifier`),
CONSTRAINT `user_inventory_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#1071 - Specified key was too long; max key length is 767 bytes
pliz fix it thx
guys look the topic !!!
@Vodkhard fix it in the file or add it ont frist topic
SADoJ_Kuro:
open the dump.sql and change
user_id varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT ‘’,
to
user_id varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’,
Error Code: 1068. Multiple primary key defined ?
Tospik
April 20, 2017, 6:51pm
59
I fix this, if your user line is in Primary key, delete the primary key, and when you will execute this SQL file, it will be good.
@MO_SnipZo
1 Like
Screens ? It is possible ?
Boubi
April 20, 2017, 6:51pm
61
I have exactly the same error
You can delete this message
Boubi
April 20, 2017, 7:03pm
64
thank
fix Error Code: 1068. Multiple primary key defined
I fix this, if your user line is in Primary key, delete the primary key, and when you will execute this SQL file, it will be good.
@MO_SnipZo
Thanks, the fix will be work @Tospik
Yes i have a same error pls help
1 Like
Dude you d’ont know he do these http://prntscr.com/eyvcfm ?
Ok so i have fixed http://prntscr.com/eyvkev
so on users you have a identifier like: http://prntscr.com/eyvkwn
so you need to create a index like: http://prntscr.com/eyvl8e
and you need to down the 255 value on 70 like on my screen
so after do that go to user_inventory and do the same of me ^^ like:
http://prntscr.com/eyvlzz
http://prntscr.com/eyvm7l
and go test now in game.
Can you make an exemple for how to add a item please ? i mean the syntax
Nervermind i found it… But how we can test the item ? have you a script for add item to the player ?
1 Like
I’m working on a script of recolting items but now you can’t really test it, that why
I wrote It’s a resource more for developers.
3 Likes
Ayone have good sql script for me please it’s not working with fix for me
Thanks