I made vip panel but when i type /vip nothing happens here is code :
GUIEditor = {button = {},window = {},edit = {}}
Show = {}
addEventHandler("onClientResourceStart", resourceRoot,
function ()
GUIEditor.window[1] = guiCreateWindow(185, 5, 382, 600, "-x[ Vip Panel #By LuckyDude ]x-", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF19FBFF")
GUIEditor.button[1] = guiCreateButton(17, 41, 165, 49, "Health +100", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFD0101")
GUIEditor.button[2] = guiCreateButton(201, 41, 165, 49, "Armor +100", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF007577")
GUIEditor.button[3] = guiCreateButton(18, 120, 348, 45, "Vip Car", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF16EE10")
GUIEditor.button[4] = guiCreateButton(18, 175, 348, 45, "Fly With Car", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFDCE916")
GUIEditor.button[5] = guiCreateButton(18, 230, 348, 45, "Drive On Water", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF0F0AF4")
GUIEditor.button[6] = guiCreateButton(18, 285, 348, 45, "Invisible Skin", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFC928DC")
GUIEditor.button[7] = guiCreateButton(18, 340, 348, 45, "Invisible Car", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF3493A4")
GUIEditor.button[8] = guiCreateButton(18, 395, 348, 45, "Vip Weapon (Minigun)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FF68785F")
GUIEditor.button[9] = guiCreateButton(18, 450, 348, 45, "Vip Skin", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FF63B771")
GUIEditor.button[10] = guiCreateButton(18, 505, 348, 45, "High Jump", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FF4D2454")
GUIEditor.label[1] = guiCreateLabel(18, 565, 235, 30, "Vip Panel by: LuckyDude", false, GUIEditor.window[1])
addCommandHandler ("skinpanel",gui)
guiSetVisible (GUIEditor.window[1], false)
--- Events
addEventHandler("onClientGUIClick", GUIEditor.button[1], setCrysis, false)
addEventHandler("onClientGUIClick", GUIEditor.button[2], regenArmor , false)
addEventHandler("onClientGUIClick", GUIEditor.button[3], vipcar, false)
addEventHandler("onClientGUIClick", GUIEditor.button[4], fly, false)
addEventHandler("onClientGUIClick", GUIEditor.button[5], hover, false)
addEventHandler("onClientGUIClick", GUIEditor.button[6], toggleInvis, false)
addEventHandler("onClientGUIClick", GUIEditor.button[7], invisibility, false)
addEventHandler("onClientGUIClick", GUIEditor.button[8], vipweap, false)
addEventHandler("onClientGUIClick", GUIEditor.button[9], setvip, false)
addEventHandler("onClientGUIClick", GUIEditor.button[10], highjump, false)
end)
---
function regenArmor()
for _,player in ipairs(getElementsByType("player")) do
local arm = getPedArmor(player);
if arm < 100 then
local nuarm = arm + 10;
if nuarm > 100 then nuarm = 100; end
setPedArmor(player,nuarm)
end
function fly()
if not flyEnabled then
setWorldSpecialPropertyEnabled ( "aircars", true )
flyEnabled = true
else
setWorldSpecialPropertyEnabled ( "aircars", false )
flyEnabled = false
end
function hover ()
if not isWorldSpecialPropertyEnabled( "hovercars" ) then
outputChatBox("Water drive: on ", 255, 255, 0 )
else
setWorldSpecialPropertyEnabled( "hovercars", false )
end
function highjump ()
if not isWorldSpecialPropertyEnabled( "extrajump" ) then
setWorldSpecialPropertyEnabled( "extrajump", true )
else
setWorldSpecialPropertyEnabled( "extrajump", false )
end
function invisibility ()
if(getElementAlpha(source) > 200)
then
setElementAlpha(getPedOccupiedVehicle(source), 0)
else
setElementAlpha(getPedOccupiedVehicle(source), 255)
end
function toggleInvis ()
if getElementAlpha( thePlayer ) == 0 then
setElementAlpha ( thePlayer, 0 )
else
setElementAlpha ( thePlayer, 255
end
unction setvip ()
screamTXD = engineLoadTXD("vip.txd")
engineImportTXD(vipTXD, 25 )
screamDFF = engineLoadDFF("vip.dff")
engineReplaceModel(vipDFF, 25)
setElementModel(localPlayer,25)
end
function vipcar ()
local luckyBugger = getLocalPlayer()
local x, y, z = getElementPosition ( luckyBugger )
createVehicle ( 411, x, y, z + 10 )
end
function vipweap ()
giveWeapon ( source, 38, 5000 )
end
---
Show.dX_ = function()
Show.dx = (not Show.dx)
removeEventHandler("onClientRender",root, dx)
if (Show.dx) then
addEventHandler("onClientRender",root, dx)
end
end
function gui( )
guiSetVisible (GUIEditor.window[1],not guiGetVisible (GUIEditor.window[1]))
showCursor (guiGetVisible (GUIEditor.window[1]))
Show.dX_()
end