Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. Jaysds1

    Problems

    NVM I don't need help with the Pay n Spray script anymore. But I still need help with the Update GUI.
  2. Jaysds1

    Colorblips

    ok Edit: here: addEventHandler ( "onPlayerJoin",getResource(getThisResource()), function() spawnPlayer (client, x, y, z, 0, math.random (1,288), 0, 0, teamF) end)
  3. Ya, We're tryin to help you and your saying "WTF"
  4. Jaysds1

    Colorblips

    ok Edit: Do you mean the one in the script or you want the player to spawn?
  5. ooohhhh ok, your right JR10
  6. Jaysds1

    Colorblips

    i edited it again now try it.
  7. Jaysds1

    Colorblips

    try this then: addEventHandler ( "onClientResourceStart", getRootElement(getThisResource()), function( resource, source ) for id, source in ipairs( getElementsByType ( "source" ) ) do if getPlayerTeam(source) ~= nil then local r, g, b = getTeamColor(getPlayerTeam(source)) createBlipAttachedTo ( source, 0, 2, r,g,b ) else if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end end end) addEventHandler ( "onPlayerSpawn",getRootElement(), function( spawnpoint ) if getPlayerTeam(source) ~= nil then local r, g, b = getTeamColor(getPlayerTeam(source)) createBlipAttachedTo ( source, 0, 2, r,g,b ) else if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end end) I added the Event Handlers so when the resource start the blip is on the person, and when the player spawns it moves with them.
  8. Jaysds1

    Colorblips

    ok here: function onResourceStart ( resource, source ) for id, source in ipairs( getElementsByType ( "source" ) ) do if getPlayerTeam(source) ~= nil then local r, g, b = getTeamColor(getPlayerTeam(source)) createBlipAttachedTo ( source, 0, 2, r,g,b ) else if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end end end function onPlayerSpawn ( spawnpoint ) if getPlayerTeam(source) ~= nil then local r, g, b = getTeamColor(getPlayerTeam(source)) createBlipAttachedTo ( source, 0, 2, r,g,b ) else if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end end
  9. Jaysds1

    clone

    I'm not sure if you could clone all of them, by one.
  10. what are you trying to do here?
  11. there is no such thing, unless someone could create one.
  12. Jaysds1

    Colorblips

    i tested this, this has no error: function onResourceStart ( resource, source ) for id, source in ipairs( getElementsByType ( "source" ) ) do if getPlayerTeam" class="kw2">getPlayerTeam(source) ~= nil then local r, g, b = getTeamColor(getPlayerTeam" class="kw2">getPlayerTeam(source)) createBlipAttachedTo ( source, 0, 2, r,g,b ) else if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end end end function onPlayerSpawn ( spawnpoint ) if getPlayerTeam" class="kw2">getPlayerTeam(source) ~= nil then local r, g, b = getTeamColor(getPlayerTeam" class="kw2">getPlayerTeam(source)) createBlipAttachedTo ( source, 0, 2, r,g,b ) else if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end end
  13. Jaysds1

    Colorblips

    ok I found the reason try this: function onResourceStart ( resource, client ) for id, client in ipairs( getElementsByType ( "client" ) ) do if getPlayerTeam" class="kw2">getPlayerTeam class="kw2">getPlayerTeam(client) ~= nil then local r, g, b = getTeamColor(getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam(client)) createBlipAttachedTo ( client, 0, 2, r,g,b ) else elseif ( players[client] ) then createBlipAttachedTo ( client, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( client, 0, 2, color[1], color[2], color[3] ) end end end function onPlayerSpawn ( spawnpoint ) if getPlayerTeam1(client) ~= nil then local r, g, b = getTeamColor(getPlayerTeam1(client)) createBlipAttachedTo ( client, 0, 2, r,g,b ) else elseif ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end
  14. Jaysds1

    Colorblips

    he said that the script doesn't work with or without the numbers.
  15. Jaysds1

    Problems

    ok here: cost = 10000 local paynspray = { } local payNSprayCol = { } local sensitiveMark = { } function paynsprayLoad ( res ) local paynsprayElements = getElementsByType ( "paynspray", getResourceRootElement(res) ) for k,v in ipairs(paynsprayElements) do local num = #paynspray+1 paynspray[num] = { } paynspray[num].Name = getElementData( v, "name" ) paynspray[num].PosX = tonumber( getElementData( v, "posX" ) ) paynspray[num].PosY = tonumber( getElementData( v, "posY" ) ) paynspray[num].PosZ = tonumber( getElementData( v, "posZ" ) ) if ( paynspray[num].PosX and paynspray[num].PosY and paynspray[num].PosZ ) then payNSprayCol = createColSphere ( paynspray[num].PosX, paynspray[num].PosY, paynspray[num].PosZ, 4 ) if getElementData( v, "isInGarage" ) ~= "false" then local garageNum = getElementData( v, "isInGarage" ) colGarage = createColSphere ( paynspray[num].PosX, paynspray[num].PosY, paynspray[num].PosZ, 13 ) setElementData ( colGarage, "garageNumber", ""..garageNum.."" ) addEventHandler( "onColShapeHit", colGarage, openGarage ) addEventHandler( "onColShapeLeave", colGarage, closeGarage ) end paynspray[num].marker = createMarker ( paynspray[num].PosX, paynspray[num].PosY, paynspray[num].PosZ, "cylinder", 3, 200, 200, 0, 200 ) paynspray[num].bliper = createBlip ( paynspray[num].PosX, paynspray[num].PosY, paynspray[num].PosZ, 63, 0, 0, 0, 255 ) addEventHandler( "onColShapeHit", payNSprayCol, paynsprayEnter ) end end end addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), paynsprayLoad ) function paynsprayUnload ( res ) for i=1,#paynspray do destroyElement(paynspray[i].marker); destroyElement(paynspray[i].bliper); end end addEventHandler( "onResourceStop", getResourceRootElement(getThisResource()), paynsprayUnload ) function openGarage (element) if ( getElementType ( element ) == "vehicle" ) then local garageNum = getElementData ( source, "garageNumber" ) if ( not isGarageOpen ( tonumber(garageNum) )) then setGarageOpen ( tonumber(garageNum), true ) end end end function closeGarage (element) if ( getElementType ( element ) == "vehicle" ) then local garageNum = getElementData ( source, "garageNumber" ) setGarageOpen ( tonumber(garageNum), false ) end end function paynsprayEnter ( client ) local vehicle = getPedOccupiedVehicle(client) vehicles = getElementsByType ( "vehicle" ) if getPlayerMoney ( client ) >= cost then takePlayerMoney ( client,(cost)) for vehicleKey, vehicleValue in ipairs(vehicles) do fixVehicle ( vehicleValue ) end else outputChatBox ( "You cannot afford to fix this car!",client, 0, 0, 0) end end
  16. Jaysds1

    Login GUI

    Sorry, I only got the background I'm about to create the gui you wanted.
  17. Jaysds1

    Problems

    ok EDIT: It says: [2011-06-12 12:43:37] ERROR: PayNSpray\paynspray.lua:61: attempt to compare nil with number [2011-06-12 12:43:37] WARNING: PayNSpray\paynspray.lua:59: Bad 'ped' pointer @ 'getPedOccupiedVehicle'(1) [2011-06-12 12:43:37] WARNING: PayNSpray\paynspray.lua:61: Bad 'player' pointer @ 'getPlayerMoney'(1) [2011-06-12 12:43:37] ERROR: PayNSpray\paynspray.lua:61: attempt to compare nil with boolean
  18. Jaysds1

    Colorblips

    NVM add back the numbers then.
  19. Jaysds1

    Colorblips

    Try this function onResourceStart ( resource, client ) for id, client in ipairs( getElementsByType ( "client" ) ) do if getPlayerTeam" class="kw2">getPlayerTeam(client) ~= nil then local r, g, b = getTeamColor(getPlayerTeam" class="kw2">getPlayerTeam(client)) createBlipAttachedTo ( client, 0, 2, r,g,b ) else elseif ( players[client] ) then createBlipAttachedTo ( client, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( client, 0, 2, color[1], color[2], color[3] ) end end end function onPlayerSpawn ( spawnpoint ) if getPlayerTeam1(client) ~= nil then local r, g, b = getTeamColor(getPlayerTeam1(client)) createBlipAttachedTo ( client, 0, 2, r,g,b ) else elseif ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end
  20. Darklink, Instead of posting more why didn't you use the "Edit" button and add all the post in there.
  21. Next time use the "EDIT" button. That's just a waste of posting.
  22. Jaysds1

    lack of cars?

    Ya, what server are you on? And this is not suppose to be on a forum, your suppose to send the problem to the server Admin.
  23. Jaysds1

    Problems

    And i need help with a script, I want to take the player money and fix there vehicle, but if they don't have enough then output "You don't have enough to fix you vehicle". here is my script: ONLY SERVER-SIDE function paynsprayEnter ( client ) vehicles = getElementsByType ( "vehicle" ) if getPlayerMoney ( client ) >= cost then takePlayerMoney ( client,(cost)) for vehicleKey, vehicleValue in ipairs(vehicles) do fixVehicle ( vehicleValue ) end else outputChatBox ( "You cannot afford to fix this car!",client, 0, 0, 0) end end
×
×
  • Create New...