-
Posts
1,105 -
Joined
-
Last visited
Everything posted by Aibo
-
script4: function must be created BEFORE you add is as an event handler (now it doesnt exist when you adding it) addEvent("clientKickInactivePlayer",true) function kickInactivePlayer() kickPlayer(client,"Please accept our rules.") end addEventHandler("clientKickInactivePlayer",root,kickInactivePlayer) script7: table values must be separated by commas: local keypadCodes = { ["a51MainGateKeypadCode"] = "0000", ["a51tank"] = "0000", ["a51car"] = "0000", ["a51rescar"] = "0000", ["dtresc"] = "0000" } as for XML — read wiki about XML functions
-
setCameraTarget doesnt work for peds, so i guess setCameraMatrix with onClientPreRender event?
-
well it's not on windows, but there's linux i bet. anyway, have you tried "refresh" command in console or restarting the server? maybe your resource is not even loaded.
-
"speedometer" is not "Speedometer" (or am being i paranoid? )
-
your function that you want to export: function myCoolFunction(param) if param then return param end end meta of yourResource: <export function="myCoolFunction" type="server" /> (type can be server or client) calling a function of yourResource from some other resource: exports.yourResource:myCoolFunction("blablabla") https://wiki.multitheftauto.com/wiki/Call
-
your event name: "onPlayerPickupRacePickup" correct event name: "onPlayerPickUpRacePickup" spot the difference :3
-
is this script server-side?
-
check you SQL data types maybe
-
vehicleModel can be nil (or false), if pickupType is not vehiclechange. nil/boolean concatenation will cause error
-
https://community.multitheftauto.com/index.php?p=resources&s=list search «drift» in name/description, there were some drift resources
-
this is nonsense, if you want to count players in team, then: g_Root = getRootElement() function mapstart() if countPlayersInTeam(teamSurvivor) == 0 then Endgame(teamzombie, true) end end addEventHandler ( "onGamemodeMapStart", g_Root, mapstart )
-
it's possible (?) that you can't getElementByID in client when script is loaded because server haven't yet set this id, cause its also loads the script. just my guess, i'd use events to keep things 100% synced.
-
if you'd «implemented» it in race resource it wouldn't give nil errors at race global variables. and g_ForcedNextMap is race global variable that sets next map as i recall. so g_ForcedNextMap in Buymap resource will do nothing.
-
you can't use race resource (not exported) functions and variables outside of race resource.
-
getPlayerTeam is somewhat buggy: code=lua: getPlayerTeam" class="kw2">getPlayerTeam(player) code=text: getPlayerTeam(player)
-
function findPlayer(namepart) for i, player in ipairs(getElementsByType("player")) do local name = getPlayerName(player) if string.find(name:lower(), namepart:lower(), 1, true) then return player, name end end return false end function blowPlayer(source, command, toblow) if not g_Admin[source] then outputChatBox("You don't have the permission for this.", source, 255, 0, 0) return else if toblow then local player, playerName = findPlayer(toblow) if player then blowVehicle(getPedOccupiedVehicle(player)) outputChatBox("#01DFD7" ..playerName.. " has been blown up.", 0, 0, 0, true) end end end end addCommandHandler('bu', blowPlayer)
-
http://code.google.com/p/mtasa-resources/downloads/list try here.
-
*sigh* have you added this script to meta.xml as client type? PS: you have 2 functions with the same name (Salutesf), and event handler with function Salutels, which doesnt exist. i suppose the first function should be called Salutels. you know you can fix your typos by yourself. use /debugscript 3 if you dont see them.
-
onClientMarkerHit and you need to check what element hit the marker, otherwise it will set local player's health every time any element hits the marker.
-
onMarkerHit — server-side event. getLocalPlayer() — client-side function. you can't use both in the same script, decide where you want it, client or server side.
-
math.floor(vehh) or math.ceil(vehh) or math.modf(vehh) http://lua-users.org/wiki/MathLibraryTutorial
-
setElementHealth
-
actually i've copied yours too
