Jump to content

RenanPG

Members
  • Posts

    186
  • Joined

Everything posted by RenanPG

  1. Hello, how can i send post data to a php script? "?path=test" <-- Is it correct? fetchRemote("localhost/app/downloader/size.php", function(response, erro) -- stuff end, 100, "?path=test", false)
  2. local stats = {69,73,78,70,74,77,71,72,75,76,79,23} local check = 0 for _, v in ipairs (stats) do check = check + getPedStat (localPlayer,v) end dxDrawText(check.....)
  3. You should use triggerClientLatentEvent or fetchRemote (need a local webserver), this methods don't need to be registered in meta.
  4. Probably works(i've never tried before), try it LekRoots. function getHealthColor ( ) local progress = getElementHealth ( localPlayer ) / getPedMaxHealth ( localPlayer ) local r, g, b = interpolateBetween ( 255, 0, 0, 103, 188, 107, progress, "Linear" ) return r, g, b end function getPedMaxHealth(ped) local stat = getPedStat(ped, 24) local maxhealth = 100 + (stat - 569) / 4.31 return math.max(1, maxhealth) end
  5. RenanPG

    about PHP sdk

    Hm, what i posted is just a way to get the table inside the PHP( in that case $table ).
  6. RenanPG

    about PHP sdk

    $table = json_decode(str_replace("/example.php/","",$_SERVER["PHP_SELF"])); -- then you can whatever you want =D.
  7. RenanPG

    about PHP sdk

    callRemote ( 'http://www.yoursite.com/example.php/' .. toJSON ( playerNamesTable ), function ( value ) if ( value == 'ok' ) then -- A var from your website meaning that worked. outputDebugString ( 'Player list sent successfully.' ) end end) But... You'll need to do a php script to receive and read the data.
  8. Try this one, i'm not sure: function getHealthColor ( ) local progress = getElementHealth ( localPlayer ) / -- getPedMaxHealth ( localPlayer ) -- getPedMaxHealth server-sided, and triggered. local r, g, b = interpolateBetween ( 255, 0, 0, 103, 188, 107, progress, "Linear" ) return r, g, b end
  9. You should write your post again, no one understood your problem.
  10. Não sei se compreendi corretamente sua dúvida, mas você pode usar esse script para sincronizar o horário do jogo com a hora real. --//server-side addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() local time = getRealTime() setTime(time.hour,time.minute) setMinuteDuration(60000) end)
  11. He posted it first on community. There is nothing to do...
  12. RenanPG

    Help!

    kickPlayer doesn't need admin rights. Always see wiki, I'm not offending you. "responsiblePlayer: The player that is responsible for the event. Note: If left out as in the second syntax, responsible player for the kick will be "Console" (Maximum 30 characters if using a string)." Community. In that case the responsible is Console, probably need ACL. I didn't test.
  13. RenanPG

    Help!

    Don't forget to give admin rights on ACL.
  14. I have a radar with blips support, i can give you an example just pm me. https://fbcdn-sphotos-g-a.akamaihd.net/ ... 6019_o.jpg
  15. not because dxDrawCircle will only work with Rendering dxDrawCircle make a loop with lines every frame rendering, DNL291 are right and that's why lag.
  16. RenanPG

    Question

    SQLite or mySQL, XML just if it's a small database.
  17. To get the team name use: local teamName = getTeamName(getPlayerTeam(player)) You used just getTeamName, you need to specify the team element.
  18. --// Client addEventHandler("onClientPlayerVehicleExit", getRootElement(), function() cancelEvent() end)
  19. #Samy: Nice very job. Do you speak my language?
  20. Discussing for a simple thing like this ...
  21. Because this event doesn't exist, you must use "onPlayerLogin" on server-side and trigger to client. --// Server addEventHandler("onPlayerLogin",getElementRoot(), function() triggerClientEvent(source,"onPlayerLogged",source) end ) --// Client addEvent( "onPlayerLogged", true ) addEventHandler( "onPlayerLogged", localPlayer, function() --stuff end )
×
×
  • Create New...