K4stic Posted February 15, 2013 Share Posted February 15, 2013 1. The problem is then an VIP type the command it show the gui to all --Client side function bind_key() guiSetVisible(window, true) showCursor(true) end addEvent( "GUIsee", true ) addEventHandler ( "GUIsee", getRootElement(), bind_key ) --Server side function gui(player) if vipGUI and exports.SCGvip:isPlayerVIP(player) then triggerClientEvent ( "GUIsee", getRootElement()) end end addCommandHandler ( "viphats", gui) 2. This then player type command and is VIP ot give him Jetpack but if player type again is not removed --Server side function giveVIPJetpack( thePlayer, commandName ) if giveVIPJetpack and exports.SCGvip:isPlayerVIP( thePlayer ) then if ( not doesPedHaveJetPack( thePlayer ) ) then givePedJetPack ( thePlayer ) outputChatBox("VIP: Jetpack enabled", thePlayer, 0, 250, 0) end else if doesPedHaveJetPack( thePlayer ) then removePedJetPack ( thePlayer ) outputChatBox( "VIP: Jetpack removed", thePlayer, 250, 0, 0 ) end end end addCommandHandler( "vipjetpack", giveVIPJetpack ) Link to comment
Shazzimal Posted February 15, 2013 Share Posted February 15, 2013 No, the script won't work if you tupe the command again. Couse of that "else" you must add a new event with command Link to comment
iPrestege Posted February 15, 2013 Share Posted February 15, 2013 No, the script won't work if you tupe the command again. Couse of that "else" you must add a new event with command There should not be this. Link to comment
K4stic Posted February 15, 2013 Author Share Posted February 15, 2013 Shazzimal look here => https://wiki.multitheftauto.com/wiki/GivePedJetPack Just help me guys pls Link to comment
TAPL Posted February 15, 2013 Share Posted February 15, 2013 function gui(player) if vipGUI and exports.SCGvip:isPlayerVIP(player) then triggerClientEvent(player, "GUIsee", player) end end addCommandHandler("viphats", gui) function giveVIPJetpack(thePlayer) if giveVIPJetpack and exports.SCGvip:isPlayerVIP(thePlayer) then if not doesPedHaveJetPack(thePlayer) then givePedJetPack(thePlayer) outputChatBox("VIP: Jetpack enabled", thePlayer, 0, 250, 0) else removePedJetPack(thePlayer) outputChatBox("VIP: Jetpack removed", thePlayer, 250, 0, 0) end end end addCommandHandler("vipjetpack", giveVIPJetpack) Link to comment
K4stic Posted February 15, 2013 Author Share Posted February 15, 2013 thx will try now can you help me and with this? function vipKnockedOff ( player, command ) if exports.SCGvip:isPlayerVIP(player) then if canPedBeKnockedOffBike ( getLocalPlayer() ) then setPlayerCanBeKnockedOffBike ( getLocalPlayer(), false ) outputChatBox ( "Now you can't be knocked off your bike." ) else setPlayerCanBeKnockedOffBike ( getLocalPlayer(), true ) outputChatBox ( "Now you can be knocked off your bike." ) end end end addCommandHandler ( "vipknock", vipKnockedOff ) Link to comment
albers14 Posted February 15, 2013 Share Posted February 15, 2013 thx will try now can you help me and with this? function vipKnockedOff ( player, command ) if exports.SCGvip:isPlayerVIP(player) then if canPedBeKnockedOffBike ( getLocalPlayer() ) then setPlayerCanBeKnockedOffBike ( getLocalPlayer(), false ) outputChatBox ( "Now you can't be knocked off your bike." ) else setPlayerCanBeKnockedOffBike ( getLocalPlayer(), true ) outputChatBox ( "Now you can be knocked off your bike." ) end end end addCommandHandler ( "vipknock", vipKnockedOff ) 'SetPedCanBeKnockedOffBike Link to comment
TAPL Posted February 15, 2013 Share Posted February 15, 2013 thx will try now can you help me and with this? function vipKnockedOff ( player, command ) if exports.SCGvip:isPlayerVIP(player) then if canPedBeKnockedOffBike ( getLocalPlayer() ) then setPlayerCanBeKnockedOffBike ( getLocalPlayer(), false ) outputChatBox ( "Now you can't be knocked off your bike." ) else setPlayerCanBeKnockedOffBike ( getLocalPlayer(), true ) outputChatBox ( "Now you can be knocked off your bike." ) end end end addCommandHandler ( "vipknock", vipKnockedOff ) Do you know that addCommandHandler client side does not have player parameter? Does your function isPlayerVIP available client side? Link to comment
K4stic Posted February 15, 2013 Author Share Posted February 15, 2013 me know sorry me just wrong is client side and i wos add it server side my fail 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