Plate Posted March 7, 2013 Share Posted March 7, 2013 Hola quisiera saber si esto andaria local teamname = getTeamName(getPlayerTeam(source)) if (teamName == "U.S.S") then setTimer(spawnPlayer, 10000, 1, source, 319.04815673828, 1929.021484375, 13.640625, 90, skin) Link to comment
NodZen Posted March 7, 2013 Share Posted March 7, 2013 La variable se llama: teamname . Y en el if pusiste teamName. Creo que si funcionará, Pero que es ese skin al final? Link to comment
Plate Posted March 8, 2013 Author Share Posted March 8, 2013 ese seria el respawn igual me da error en el "=" Link to comment
Arsilex Posted March 8, 2013 Share Posted March 8, 2013 local teamname = getTeamName(getPlayerTeam(source)) if teamname == "U.S.S" then setTimer(spawnPlayer, 10000, 1, source, 319.04815673828, 1929.021484375, 13.640625, 90, skin) end Link to comment
NodZen Posted March 8, 2013 Share Posted March 8, 2013 local teamname = getTeamName(getPlayerTeam(source)) if teamname == "U.S.S" then setTimer(spawnPlayer, 10000, 1, source, 319.04815673828, 1929.021484375, 13.640625, 90, skin) end Pekio, No te falta un end?. Link to comment
Alexs Posted March 8, 2013 Share Posted March 8, 2013 local teamname = getTeamName(getPlayerTeam(source)) if teamname == "U.S.S" then setTimer(spawnPlayer, 10000, 1, source, 319.04815673828, 1929.021484375, 13.640625, 90, skin) end Jamas abrió una función, solo necesita un 'end' para el estamento de arriba. Link to comment
NodZen Posted March 8, 2013 Share Posted March 8, 2013 Puede que solo sea parte del script. Link to comment
Plate Posted March 8, 2013 Author Share Posted March 8, 2013 Si es solo parte de un script Link to comment
Plate Posted March 8, 2013 Author Share Posted March 8, 2013 Me sigue dando error en el "=" Link to comment
Plate Posted March 8, 2013 Author Share Posted March 8, 2013 spawn/spawn.lua:15: "=" expected near respawn functionr respawn() local teamname = getTeamName(getPlayerTeam(source)) if teamname == "B.S.A.A" then Link to comment
NodZen Posted March 8, 2013 Share Posted March 8, 2013 spawn/spawn.lua:15: "=" expected near respawn functionr respawn() local teamname = getTeamName(getPlayerTeam(source)) if teamname == "B.S.A.A" then Postea todo el script. Link to comment
Plate Posted March 8, 2013 Author Share Posted March 8, 2013 function createTeam() sol = createTeam("Soldados", 0, 255, 0) end addEventHandler("onResourceStart", getRootElement(getThisResource()), createTeam) function spawn() spawnPlayer(source, 318.04815673828, 1939.021484375, 17.640625, 0, 297, 0, 0, sol) fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("onPlayerJoin", getRootElement(), spawn) function skin() skin = getPedSkin(source) end addEventHandler("onPlayerWasted", getRootElement(), skin) functionr respawn() local teamname = getTeamName(getPlayerTeam(source)) if teamname == "B.S.A.A" then setTimer(spawnPlayer, 10000, 1, source, -2436.6784667969,533.19683837891,29.90103149414, 90, skin) elseif teamname == "Soldados" then setTimer(spawnPlayer, 10000, 1, source, 318.04815673828, 1939.021484375, 17.640625, 90, skin) fadeCamera (source, true) setCameraTarget (source, source) end add addEventHandler("onPlayerWasted", getRootElement(), respawn) Link to comment
NodZen Posted March 8, 2013 Share Posted March 8, 2013 Nuncan va a funcionar , porque no tiene funcion... Tu funcion se llama "functionr". Ademas està mal lo debajo del ultimo end el add. Link to comment
Plate Posted March 8, 2013 Author Share Posted March 8, 2013 Fail ahora anda muchas gracias PD: Lo medio dormido al script Link to comment
NodZen Posted March 8, 2013 Share Posted March 8, 2013 Fail ahora anda muchas graciasPD: Lo medio dormido al script De nada man. Link to comment
Recommended Posts