Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You can set it damage proof with: setVehicleDamageProof
  2. Cambia: triggerClientEvent("aparecer",thePlayer) Por: triggerClientEvent ( thePlayer, "aparecer", thePlayer ) Y fijate si funciona.
  3. for k,v in ipairs(players) do setCameraMatrix(v,posX,posY,posZ,targetX,targetY,targetZ) fadeCamera ( v, true ) end Try that.
  4. Tried checking the result of the arguments you filled the camera function with?
  5. http://gtamap.delux-host.com/converter/ With that website you can convert IDE maps to MTA format.
  6. local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) local myFont = dxCreateFont( "futurebq.ttf", 20 ) function createText ( ) local playerX, playerY, playerZ = getElementPosition ( localPlayer ) -- Get our player's coordinates. local playerZoneName = getZoneName ( playerX, playerY, playerZ ) -- Get name of the zone the player is in. -- Draw zone name text's shadow. if myFont then dxDrawText (playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, myFont ) -- Draw zone name text. dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, myFont ) else dxDrawText ( "failed to import font", 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) Try that.
  7. Write on the chat: "/stop play".
  8. Lo que queres es crear pickups para un mapa para el game mode "race"?
  9. The "play" game mode spawns you on random spawnpoints defined within the resource.
  10. Los "pickups" de nitro/repair no son verdaderos pickups, son creados por el game mode "race".
  11. Do you have "play" game mode running?
  12. We don't help with illegal scripts. Topic locked.
  13. function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local x, y, z = getElementPosition ( source ) local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) ) setAccountData ( playeraccount, "s.skin", tostring ( getElementModel ( source ) ) ) setAccountData ( playeraccount, "s.x", x ) setAccountData ( playeraccount, "s.y", y ) setAccountData ( playeraccount, "s.z", z ) setAccountData ( playeraccount, "s.int", getElementInterior ( source ) ) setAccountData ( playeraccount, "s.dim", getElementDimension ( source ) ) setAccountData ( playeraccount, "s.rot", getPlayerRotation ( source ) ) setAccountData ( playeraccount, "s.team", teamName ) for weapon = 0, 12 do setAccountData ( playeraccount, "s.weap".. weapon, getPedWeapon ( source, weapon ) ) setAccountData ( playeraccount, "s.ammo".. weapon, getPedTotalAmmo ( source, weapon ) ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, function ( _, playeraccount ) local playermoney = getAccountData ( playeraccount, "s.HandMoney" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end local playerInt = getAccountData ( playeraccount, "s.int" ) local playerDim = getAccountData ( playeraccount, "s.dim" ) local playerSkin = getAccountData ( playeraccount, "s.skin" ) local playerX = getAccountData ( playeraccount, "s.x" ) local playerY = getAccountData ( playeraccount, "s.y" ) local playerZ = getAccountData ( playeraccount, "s.z" ) local playerRot = getAccountData ( playeraccount, "s.rot" ) local playerTeam = getAccountData ( playeraccount, "s.team" ) spawnPlayer ( source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim ) if ( playerTeam and getTeamFromName ( playerTeam ) ) then setPlayerTeam ( source, getTeamFromName ( playerTeam ) ) end fadeCamera ( source, true ) setCameraTarget ( source, source ) for weapon = 0, 12 do local weap = getAccountData ( playeraccount, "s.weap".. weapon ) local ammo = getAccountData ( playeraccount, "s.ammo".. weapon ) giveWeapon ( source, weap, ammo ) end end )
  14. Try this: addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "l", "down", "chatbox", "Language" ) end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "l", "down", "chatbox", "Language" ) end end ) addCommandHandler ( "Language", function ( thePlayer, _, ... ) local playerLanguage = getElementData ( thePlayer, "lang" ) for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "lang" ) == playerLanguage ) then outputChatBox ( playerLanguage ..": ".. getPlayerName ( thePlayer ) ..": ".. table.concat ( { ... }, " " ), player, 255, 255, 255 ) end end end )
  15. function onQuit ( ) local account = getPlayerAccount ( source ) if ( isGuestAccount ( account ) ) then return end setAccountData ( account, "stat22", tostring ( getPedStat ( source, 69 ) ) ) setAccountData ( account, "stat23", tostring ( getPedStat ( source, 70 ) ) ) setAccountData ( account, "stat24", tostring ( getPedStat ( source, 71 ) ) ) setAccountData ( account, "stat25", tostring ( getPedStat ( source, 72 ) ) ) setAccountData ( account, "stat26", tostring ( getPedStat ( source, 73 ) ) ) setAccountData ( account, "stat27", tostring ( getPedStat ( source, 74 ) ) ) setAccountData ( account, "stat28", tostring ( getPedStat ( source, 75 ) ) ) setAccountData ( account, "stat29", tostring ( getPedStat ( source, 76 ) ) ) setAccountData ( account, "stat30", tostring ( getPedStat ( source, 77 ) ) ) setAccountData ( account, "stat31", tostring ( getPedStat ( source, 78 ) ) ) setAccountData ( account, "stat32", tostring ( getPedStat ( source, 79 ) ) ) setAccountData ( account, "stat0", tostring ( getPedStat ( source, 22 ) ) ) setAccountData ( account, "stat1", tostring ( getPedStat ( source, 23 ) ) ) setAccountData ( account, "stat2", tostring ( getPedStat ( source, 24 ) ) ) end addEventHandler ( "onPlayerQuit", getRootElement(), onQuit ) function playerLogin ( _, account ) local Staminastat = getAccountData ( account, "stat0" ) local Musculestat = getAccountData ( account, "stat1" ) local Healthstat = getAccountData ( account, "stat2" ) local Pistolskill = getAccountData ( account, "stat22" ) local SilencedPistolskill = getAccountData ( account, "stat23" ) local DesertEagleskill = getAccountData ( account, "stat24" ) local Shotgunskill = getAccountData ( account, "stat25" ) local SawnOffskill = getAccountData ( account, "stat26" ) local Spaz12skill = getAccountData ( account, "stat27" ) local Uziskill = getAccountData ( account, "stat28" ) local MP5skill = getAccountData ( account, "stat29" ) local AK47skill = getAccountData ( account, "stat30" ) local M4skill = getAccountData ( account, "stat31" ) local Sniperskill = getAccountData ( account, "stat32" ) setPedStat ( source, 22, Staminastat ) setPedStat ( source, 23, Musculestat ) setPedStat ( source, 24, Healthstat ) setPedStat ( source, 69, Pistolskill ) setPedStat ( source, 70, SilencedPistolskill ) setPedStat ( source, 71, DesertEagleskill ) setPedStat ( source, 72, Shotgunskill ) setPedStat ( source, 73, SawnOffskill ) setPedStat ( source, 74, Spaz12skill ) setPedStat ( source, 75, Uziskill ) setPedStat ( source, 76, MP5skill ) setPedStat ( source, 77, AK47skill ) setPedStat ( source, 78, M4skill ) setPedStat ( source, 79, Sniperskill ) end addEventHandler ( "onPlayerLogin", getRootElement(), playerLogin )
  16. What you can do instead is create just one bind, for "Language" chat, and then it checks the player language and sends it to only these with the same language.
  17. Castillo

    How to.. ?

    local values = { "one", "two", "three" } for _, value_ in ipairs ( values ) do if ( value == value_ ) then outputChatBox ( 'Found matching' ) break end end
  18. Castillo

    bots team

    Probaste creando los dos bots en el mismo team al principio?
  19. Castillo

    SQL set nick

    And the problem is...?
  20. swat_m4 = createPickup ( 2563.6943359375, -1297.4033203125, 1031.421875, 2, 31, 1, 5000 ) setElementInterior(swat_m4,2) You set it as a custom pickup, and with a weapon object, not the weapon type and weapon ID.
  21. "playeraccount" to "account".
×
×
  • Create New...