Jump to content

Admigo

Members
  • Posts

    175
  • Joined

  • Last visited

Everything posted by Admigo

  1. Where i need to put this?
  2. Dear scripters, I want to make a colored deathlist but i dont know how i need to make it. I need to make it with dxtext but i cant figure it out how. Can someone help me pls? Thanks Admigo
  3. Can you send my this code with the new code pls?
  4. Thats really strange,its just the default nametag file,i will try your code thanks;)
  5. Its not a resource,its the file in race.zip so the race gm.
  6. Still not working,i delete the codes i added from this thread but still same problem. i didnt change something in nametag.
  7. Dear scripters, I have nothing changed in nametag and now i got an error with it so i cant play race anymore: Error: nametag.lau:38:bad argument #1 to ipairs (table expected ,got nil) Code: for i,player in ipairs(g_Players) do How can i fix this? Thanks Admigo
  8. I put the code in script now i get spam errors in debuscript NameTags.lua 38:Bad Argument 1# to ipairs (table exptected,got nil) I deleted the code but now i get the error everytime and cant play race gm anymore. I didnt change something in nametag. How to fix it?
  9. Works but only one problem,when u stay longer in the hunter pickup u get more money. And the scoreboard: When you get the hunter u get money and you see money in the scoreboard but when there comes a new map the money collum is 0 but at admin you see that you have money. How can i fix this pls.
  10. Thanks dude,works. Now i need to fix the money collum. When a new map start the collum is empty.
  11. Dear Scripters, I want to make when u get the hunter u will get 1000 money. But when i take the hunter i dont get money. And i made a money collum for score board but it dont work. Code Hunter Money: function SToptimesManager:playerFinished( player, newTime, dateRecorded ) -- Check if top time recording is disabled for this player if getElementData ( player, "toptimes" ) == "off" then return end if not self.mapTimes then outputDebug( 'TOPTIMES', 'SToptimesManager:playerFinished - self.mapTimes == nil' ) return end dateRecorded = dateRecorded or getRealDateTimeNowString() local oldTime = self.mapTimes:getTimeForPlayer( player ) -- Can be false if no previous time local newPos = self.mapTimes:getPositionForTime( newTime, dateRecorded ) -- See if time is an improvement for this player if not oldTime or newTime < oldTime then local oldPos = self.mapTimes:getIndexForPlayer( player ) triggerEvent("onPlayerToptimeImprovement", player, newPos, newTime, oldPos, oldTime, self.displayTopCount, self.mapTimes:getValidEntryCount() ) -- See if its in the top display if newPos <= self.displayTopCount then outputChatBox( '#FF6600[TOPTIME]: #FFFFFF' .. getPlayerName(source) .. ' #FFFFFFgot toptime position #FF6600' .. newPos .. ' #FF6600[Time: ' .. SMaptimes:timeMsToTimeText(newTime) .. ']', root, 2, 255, 2, true) givePlayerMoney ( player, 1000 ) end if oldTime then outputDebug( '#FF6600[TOPTIME]: #FFFFFF' .. getPlayerName(source) .. ' #FFFFFFgot toptime position #FF6600' .. newPos .. ' #FF6600[Time: ' .. SMaptimes:timeMsToTimeText(newTime) .. ']', root, 2, 255, 2, true) givePlayerMoney ( player, 1000 ) end self.mapTimes:setTimeForPlayer( player, newTime, dateRecorded ) -- updateTopText if database was changed if newPos <= self.displayTopCount then self:updateTopText() end end outputDebug( 'TOPTIMES', '++ SToptimesManager:playerFinished ' .. tostring(getPlayerName(player)) .. ' time:' .. tostring(newTime) ) end Code Money Collum Client: addEventHandler("onClientResourceStart",resourceRoot, function () setTimer(updateMoney, 1000, 0) end) function updateMoney() local newMoney = getPlayerMoney ( localPlayer ) if pMoney ~= newMoney then pMoney = newMoney setElementData ( localPlayer, "Money", newMoney ) end end Code Money Collum Server: addEventHandler("onResourceStart",resourceRoot, function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","Money") end ) Pls,how can i fix this problems? Thanks Admigo
  12. I used this code to on my script but when i get a personal record i get a error:bad argument@output chatbox and in game it says:TOPTIMES: END#Admigo new personal best 01:01:544 26255. How can i fix this?
  13. Thanks dude,Code works great:P
  14. I get spam error:bad argument@GetPlayerTeam How can i fix this?
  15. Dear scripters, I have a problem with this script: function setTheCarColors( ) local endteam = getTeamFromName( "END#" ) for i, car in ipairs( getElementsByType( "vehicle" ) ) do local theplayer = getVehicleOccupant( car ) local nowteam = getPlayerTeam( theplayer ) if theplayer then if(nowteam == endteam) then setVehicleColor(car, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) end end end end addEvent("onVehColorChange",true) addEventHandler("onVehColorChange",getRootElement(),setTheCarColors) function timer() --Delay it a bit to allow players to warp in their vehicle... setTimer(setTheCarColors,500,0) end addEventHandler("onMapStarting",getRootElement(),timer) addCommandHandler ( "set_vehicle_color", setTheCarColors ) I want that players is admin team get a yellow carpaint with a time of 500 so its detecting it. But why this code dont work? Thanks Admigo
  16. Admigo

    3 codes need.

    Dear Mta Scripters, I need 3 codes for this rocket shooting code: addCommandHandler("boom",function() local occupiedVehicle = getPedOccupiedVehicle(getLocalPlayer()) local x, y, z = getElementPosition(occupiedVehicle) local matrix = getElementMatrix(occupiedVehicle) local offX = 0 * matrix[1][1] + 1 * matrix[2][1] + 0 * matrix[3][1] + 1 * matrix[4][1] local offY = 0 * matrix[1][2] + 1 * matrix[2][2] + 0 * matrix[3][2] + 1 * matrix[4][2] local offZ = 0 * matrix[1][3] + 1 * matrix[2][3] + 0 * matrix[3][3] + 1 * matrix[4][3] vx = offX - x vy = offY - y vz = offZ - z local rotx, roty, rotz = getElementRotation(occupiedVehicle) createProjectile(getLocalPlayer(), 19, x, y, z+1, 500, nil, 0, 0, 360 - rotz, vx, vy, vz) end) 1.How can i change this command into a key(that i need to press left button to shoot) 2.How can i only use this command(key) every 4 seconds? 3.How can i change the distance of the rocket(that the rocket can shoot a long distance) I hope someone help me with this. Thanks Admigo
  17. Heey all, I have a problem . I want to make the outside ring of the vehiclechange pickup black but i cant find the color code in the txd(the pixel code idk) I am using txd workshop and to change colors with paint but i cant find the grey code. Can someone make for me the outside ring black pls?Not the whole car! Thanks Admigo
  18. Heey all, I made a code for scoreboard if player login in he sets to a team in scoreboard. My clan Works(END) but vip dont work. Code: if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player, teamAdmin) else if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP!" ) ) then setPlayerTeam ( player, teamVIP ) else setPlayerTeam ( player, teamPlayers ) end No Errors. Why its not working? Thanks Admigo
  19. function setteam(player) local account = getPlayerAccount(player) if not account or isGuestAccount(account) then setPlayerTeam ( player, teamPlayers ) return end local accName = getAccountName ( account) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player, teamAdmin) else if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP!" ) ) then setPlayerTeam ( player, teamVIP ) else setPlayerTeam ( player, teamPlayers ) end end Error:end expected to close function at line 1429 near eof
  20. Heey all, I made this: addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) --we attach the function to this resource's root element function setteam(player) local account = getPlayerAccount(player) if not account or isGuestAccount(account) then setPlayerTeam ( player, teamPlayers ) return end local accName = getAccountName ( account) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player, teamAdmin) else if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP!" ) ) then setPlayerTeam ( player, teamVIP) else setPlayerTeam ( player, teamPlayers ) end end But its not working,how can i get it to work? Thanks Admigo
  21. U call it simple:P I am so noob in scripting mta.
×
×
  • Create New...