TheSmart Posted June 17, 2016 Share Posted June 17, 2016 (edited) Hello Guys! Today i downloaded GTI Gamemode but i have problem in GTIaccounts script i try to solve but i fail can anyone help me? Sorry For Bad english!! GTIaccounts/Spawn/Spawn.slua -- On Player Login ------------------->> function spawn(player) local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return end -- Position local pos = GAD(account, "position") if (not pos) then triggerClientEvent(player, "GTIaccounts.firstTimeSpawn", resourceRoot, spawnPoints) return end -- Skin ID local skin = GAD(account, "skin") if (not skin) then exports.GTIclothes:selectSkinFromStore(player) return end pos = split(pos, ",") x,y,z,rot,int,dim = tonumber(pos[1]), tonumber(pos[2]), tonumber(pos[3]), tonumber(pos[4]), tonumber(pos[5]), tonumber(pos[6]) -- Spawn Player spawnPlayer(player, x, y, z, rot, skin, int, dim) exports.GTIhud:showHud(player) showChat(player, true) setCameraTarget(player, player) setTimer(setElementFrozen, 1500, 1, player, false) -- Health/Armor local health = GAD(account, "health") or "0,100" health = split(health, ",") setPedArmor(player, tonumber(health[1])) setElementHealth(player, tonumber(health[2])) -- Team local team = GAD(account, "team") or DEFAULT_TEAM exports.GTIteams:assignTeam(player, team) -- Name Color local name_color = GAD(account, "name_color") if (name_color) then r,g,b = unpack( split(name_color, ",") ) r,g,b = tonumber(r), tonumber(g), tonumber(b) exports.GTIblips:setPlayerNameColor(player, r, g, b) end -- Account Creation local accCreate = GAD(account, "accountCreation") if (not accCreate) then local timestamp = getRealTime().timestamp SAD(account, "accountCreation", timestamp) end -- Last Login local timestamp = getRealTime().timestamp SAD(account, "lastLogin", timestamp) triggerEvent("onPlayerFirstTimeSpawn", player) end ERROR GTIaccounts\spawn\spawn.slua:36: call: failed to call 'GTIclothes:selectSkinFromStore' [string "?"] Please Anyone help me to solve this problem D: Edited June 17, 2016 by Guest Link to comment
KariiiM Posted June 17, 2016 Share Posted June 17, 2016 The code is failed to call the function sekectSkinFromStore of GIclothes resource, be sure this GIclothes is running. Link to comment
TheSmart Posted June 17, 2016 Author Share Posted June 17, 2016 Yep script s running D: Link to comment
KariiiM Posted June 17, 2016 Share Posted June 17, 2016 Check the meta.xml and be sure that the function sekectSkinFromStore is declared as an exported function. Link to comment
TheSmart Posted June 17, 2016 Author Share Posted June 17, 2016 in GTIaccounts or GTIclothes? ----------------------------------------- GTIaccounts "JTPenn" version="1.5" name="Accounts System" type="script" description="Accounts System and Central Accounts Database" autostart="true" /> GTIclothes btw still not working Link to comment
Discord Moderators AlexTMjugador Posted June 18, 2016 Discord Moderators Share Posted June 18, 2016 Make sure that your GTIclothes meta.xml doesn't contain any trailing spaces after the function name. That is, instead of having: <meta> ... <export function="selectSkinFromStore " type="server" /> <export function="selectSkinFromStore " type="client" /> ... </meta> You should have: <meta> ... <export function="selectSkinFromStore" type="server" /> <export function="selectSkinFromStore" type="client" /> ... </meta> Link to comment
TheSmart Posted June 18, 2016 Author Share Posted June 18, 2016 still getting same error Link to comment
TheSmart Posted June 18, 2016 Author Share Posted June 18, 2016 anyone? please fast i need this ASAP Link to comment
KariiiM Posted June 18, 2016 Share Posted June 18, 2016 in GTIaccounts or GTIclothes? I have no idea about this game mode, if you stuck go ahead and ask the developers who created this. Link to comment
Discord Moderators AlexTMjugador Posted June 18, 2016 Discord Moderators Share Posted June 18, 2016 Double check that selectSkinFromStore is a global (i.e. not local) function in the GTIclothes resource. Exports won't work when trying to export a global function. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now