darkphoenixxx 7 Posted May 17, 2015 Share Posted May 17, 2015 How comes this does not work: coordsy = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)vehh = VEHICLE.CREATE_VEHICLE(GAMEPLAY.GET_HASH_KEY((char *)"REBEL2"), 0.0, 5.0, 0.0), coordsy.x, coordsy.y, coordsy.z, 0.0, 1, 1) Lua cant cast types like that? Should i just put hash? in HEX or DEC? Link to post Share on other sites
Vrock_wave 198 Posted May 17, 2015 Share Posted May 17, 2015 Use my example local tecD = GAMEPLAY.GET_HASH_KEY("hakuchou") while(not STREAMING.HAS_MODEL_LOADED(tecD)) do wait(50) end local carcordt = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, -10.0, 0.0); local vrockcar3 = VEHICLE.CREATE_VEHICLE(tecD, carcordt.x, carcordt.y, carcordt.z, 1,false,true); Link to post Share on other sites
qaisjp 2 Posted May 17, 2015 Share Posted May 17, 2015 darkphoenix, lua doesn't have casting like that, and only strings/numbers exist - no ints/floats/chars etc. To convert anything into strings, use tostring(nil); stuff into numbers: tonumber("1") Link to post Share on other sites
darkphoenixxx 7 Posted May 17, 2015 Author Share Posted May 17, 2015 (edited) Thanks!!! You guys rock. But still does not work for me Does LUA wrapper makes any kind of log? Edited May 17, 2015 by darkphoenixxx Link to post Share on other sites