Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. Wei

    Serials

    how can I make it XML based what I put as value of node or how ?
  2. Wei

    Serials

    So... I'm making a ban system. Depends on what could I put banned serials/IPs. In xml or how ? I wanna make it on command not to add it in script.
  3. try. I didn't test it so it's not 100% that will work... exports [ 'scoreboard' ]:addScoreboardColumn ( "Points" ) function onRaceFinish( rank ) local acc = getPlayerAccount( source ) local ptzData = getAccountData( acc, "Points" ) if rank == 1 then if ptzData then setAccountData( acc, "Points", ptzData + 1 ) else setAccountData( acc, "Points", 1 ) end end end addEventHandler("onPlayerFinish", getRootElement(), onRaceFinish) function refreshData() for k, v in ipairs (getElementsByType("player")) do local data = getAccountData(getPlayerAccount( v ), "Points" ) if data then setElementData( v, "Points", data ) end end end setTimer( refreshData, 1000, 0 )
  4. Script it your self. Or pay someone to script for you.
  5. Wei

    play Sound

    How can I set 2 grid List item data ?
  6. Wei

    play Sound

    Thanks Both
  7. Wei

    play Sound

    local sTations = { { "Power 181", "http://www.181.fm/asx.php?station=181-uktop40&style=&a..scription=" }, } addEventHandler( "onClientResourceStart", getRootElement( ), function () for i, n in pairs ( sTations ) do local row = guiGridListAddRow ( stationGridList ) guiGridListSetItemText ( stationGridList, row, column, n[1], false, false ) end end ) function test() local statioN = guiGridListGetItemText ( stationGridList, guiGridListGetSelectedItem ( stationGridList ), 1 ) if station == n[1] then playSound( n[2] ) end end addEventHandler("onClientGUIClick", player, test ) how can I make this work ? I tryed but failed...
  8. function sendMoney( sPlayer, sMoney ) if ( getPlayerMoney(source) >= tonumber(sMoney) ) then givePlayerMoney( sPlayer, sMoney ) takePlayerMoney( source, sMoney ) else outputChatBox("You don't have enought money", source) end end how can I make here if the sMoney is not number then will return end instead of error ?
  9. function refreshData() local x, y, z = getElementPosition( localPlayer ) or "N/A" local location = getZoneName ( x, y, z ) or "N/A" guiSetText( perDataLabel[5], "Position : "..x..","..y..","..z ) guiSetText( perDataLabel[6], "Location : "..location ) end Error that x is a nil value and for location is the error expected number at argument 2 got nil
  10. Wei

    Button color

    Found it thanks!
  11. Wei

    Button color

    MTA GUI And its posible I know !
  12. Wei

    Button color

    How can I change the gui Button color ?
  13. It's race! You are allready in vehicle!!!!!
  14. But player is allready in a vehicle. I think.
  15. setTimer( function () local players = getElementsByType ( "player" ) for _,v in ipairs(players) do if getTeamName(getPlayerTeam( v )) == "|Kr1|" then local pVehicle = getPedOccupiedVehicle( v ) if pVehicle then setVehicleColor( pVehicle, 123, 143, 209 ) end end end end , 100, 0) Try
  16. Try. I never tryed this way... addEventHandler("onClientGUIClick", guiRoot, function ( ) if ( source == GUIEditor_Button[2] ) then triggerEvent ( "playEvent", getRootElement()) end end ,true) addEvent ( "playEvent", true ) function playEvent () song = playSound3D("song.mp3", -471.60000610352, -547.79998779297, 24.39999961853, false) end addEventHandler ( "playEvent", getRootElement(), playEvent )
  17. addEventHandler("onClientGUIClick", guiRoot, function ( ) if ( source == GUIEditor_Button[2] ) then song = playSound3D("song.mp3", -471.60000610352, -547.79998779297, 24.39999961853, false) end end ,true)
×
×
  • Create New...