boro Posted February 25, 2013 Share Posted February 25, 2013 Hi all i have problem i make wasted screen with DrawRectangle but if is player wated then this wated screen see all players why? what is bad ? server side function onPlayerWasted( ammo,attacker,weapon,bodypart ) destroyBlipsAttachedTo(source) setTimer( spawnPlayerTeam, 20000, 1, source ) triggerClientEvent ( "onWasonEvent", root, "text" ) end client side addEvent ( "onWasonEvent", true ) function wasonEventHandler ( text ) addEventHandler("onClientRender", getRootElement(), drawStuffa) -- Keep everything visible with onClientRender. showChat ( false ) showPlayerHudComponent ( "radar", false ) end addEventHandler ( "onWasonEvent", root, wasonEventHandler ) client side function drawStuffa() local x,y = guiGetScreenSize() dxDrawRectangle ( 0, 0, x, y/6, tocolor ( 0, 0, 0, 255 ) ) dxDrawRectangle ( 0, y/1.15, x, y/4, tocolor ( 0, 0, 0, 255 ) ) end Link to comment
csiguusz Posted February 25, 2013 Share Posted February 25, 2013 Trigger the event only to the wasted player not to all. triggerClientEvent ( source, "onWasonEvent", root, "text" ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now