Jump to content

the image does not appear.


Speak

Recommended Posts

Posted
Wiki quote:
Note: Client side function only works with the server the player is connected to

can not be executed on the client?

Posted

I believe it means if you're trying to use it client-side, you can only download files that are server-side. So, you'd need to put the image in the server-side version of the resource.

Posted

The problem is that he's using 'source' in triggerClientEvent ( if I'm right ).

function startImageDownload ( ) 
    fetchRemote ( "http://www.xn--fischspezialitten-knobloch-thc.de/wp-content/uploads/2010/05/ice.png", myCallback, "", false ) 
    outputChatBox ( "oi" ) 
end 
addEventHandler ( "onResourceStart", root, startImageDownload ) 
  
function myCallback ( responseData, errno ) 
    if ( errno == 0 ) then 
        triggerClientEvent ( root, "onClientGotImage", root, responseData ) 
    end 
end 

Try it.

Posted

Actually, what you posted would go for everybody. I did realize he's using playerToReceive which is a resource and not a player.

Simple solution would be to set that variable into a player

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...