Evil-Cod3r Posted December 7, 2011 Posted December 7, 2011 Hi all i Made this what i do now ?? how To Make it work ? GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Progress = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(402,321,553,243,"Send Money By Evil-Cod3r [V1.0]",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(420,25,107,19,"Your Money :",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(214,33,131,18,"Player:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(209,57,211,35,"",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(207,127,223,37,"",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(210,104,159,24,"Amount:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],0,0,255) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(212,174,168,40,"Send !",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Progress[1] = guiCreateProgressBar(398,185,135,22,false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(755,172,5,5,"",false) GUIEditor_Grid[1] = guiCreateGridList(406,346,202,208,false) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted December 7, 2011 Posted December 7, 2011 You only have the GUI code, which is the easy part, now you need to learn on how to make the rest. Functions that you may need: guiGridListAddRow guiGridListGetSelectedItem guiGridListGetItemText guiGridListSetItemText getElementsByType getPlayerName triggerServerEvent getPlayerMoney takePlayerMoney givePlayerMoney getPlayerFromName San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Evil-Cod3r Posted December 7, 2011 Author Posted December 7, 2011 its Hard For Me thx any why My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Evil-Cod3r Posted December 7, 2011 Author Posted December 7, 2011 i tryed like this ? clientSide----- function Money () outputChatBox ( ".:[ Money Send Gui ! |#666666 By Evil-Cod3r #FFFF1A]:.", getRootElement(), 255, 255, 255, true ) Window = guiCreateWindow(426,69,681,298,"[send Mony] V2.0 By Evil-Cod3r",false) guiWindowSetMovable(Window,false) guiWindowSetSizable(Window,false) GUIEditor_Label[1] = guiCreateLabel(496,21,86,17,"Your Money :",false,Window) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(317,240,5,5,"",false,Window) GUIEditor_Label[3] = guiCreateLabel(217,61,190,20,"Players :",false,Window) guiLabelSetColor(GUIEditor_Label[3],0,0,255) guiSetFont(GUIEditor_Label[3],"clear-normal") GUIEditor_Edit[1] = guiCreateEdit(216,85,224,36,"50",false,Window) GUIEditor_Label[4] = guiCreateLabel(215,140,211,29,"Cash :",false,Window) guiLabelSetColor(GUIEditor_Label[4],255,0,0) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Edit[2] = guiCreateEdit(213,162,241,41,"100",false,Window) GUIEditor_Label[5] = guiCreateLabel(493,270,177,18,"Less Cash To Send is 200 !",false,Window) guiLabelSetColor(GUIEditor_Label[5],255,0,255) guiSetFont(GUIEditor_Label[5],"clear-normal") GUIEditor_Image[1] = guiCreateStaticImage(481,61,168,158,"images/M.png",false,Window) playerGridList = guiCreateGridList(12,27,199,262,false,Window) guiGridListSetSelectionMode(playerGridList,2) guiGridListAddColumn(playerGridList,"Players :",0.2) Go = guiCreateButton(220,230,218,31,"Send !",false,Window) guiSetFont(Go,"clear-normal") triggerServerEvent ( "onMoneyTrasf", getLocalPlayer() ) end addEventHandler( "onClientResourceStart", getRootElement( ), Money) ServerSide ---- function trasferMoney(theReicivitor, theInviator, amount) local target = tostring(theReicivitor) local account = getPlayerAccount(theInviator) if not (isGuestAccount(account)) then if (target) then if (amount) then local targetPlayer = getPlayerFromName(target) local amount = math.floor(tonumber(amount)) if (targetPlayer) then local targetAccount = getPlayerAccount(targetPlayer) if not (isGuestAccount(targetAccount)) then if not (source == targetPlayer) then if (amount > 0) then local sourceCash = getAccountData(account, "cash") if (tonumber(sourceCash) > amount) then setTimer(outputChatBox,50,1,"* #FFFFFF"..getPlayerName(source).. " #FFB200Has Send Mony " ..tostring(amount).. "$ to #FFFFFF"..getPlayerName(targetPlayer).."#FFB200!", getRootElement(), unpack(scriptcol[1])) addStat(account, "cash", -amount) addStat(targetAccount, "cash", amount) else outputChatBox("* You Don't Have That Money!", source, unpack(scriptcol[2])) end else outputChatBox("* Invalid number! Please enter a number > 0!", source, unpack(scriptcol[2])) end else outputChatBox("* You Can't Transfer Money To Yourself!", source, unpack(scriptcol[2])) end else outputChatBox(targetError, source, unpack(scriptcol[2])) end else outputChatBox("* Could not find player!", source, unpack(scriptcol[2])) end else outputChatBox("* Error: Please enter an amount! SYNTAX: !donate ", source, unpack(scriptcol[2])) end else outputChatBox("* Error: Please enter a player name! SYNTAX: !donate ", source, unpack(scriptcol[2])) end else outputChatBox(registerError, source, unpack(scriptcol[2])) end end addEvent("onMoneyTrasf", true) addEventHandler("onMoneyTrasf", getRootElement(), trasferMoney) My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Evil-Cod3r Posted December 7, 2011 Author Posted December 7, 2011 Please Some One Help Me littel bit My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted December 7, 2011 Posted December 7, 2011 I don't want to sound rude, but that's a mess, you should start with easier scripts if you are new. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Evil-Cod3r Posted December 7, 2011 Author Posted December 7, 2011 OK Man Thx For The Tip can you give me some Touritol i can learn Form it and sorry For Bad english My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted December 7, 2011 Posted December 7, 2011 You can read the scripting introduction(s): https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI P.S: You may want to check this out: https://community.multitheftauto.com/index.php?p= ... ls&id=3224 maybe you can learn form it . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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