
sckatchof
Members-
Posts
394 -
Joined
-
Last visited
Everything posted by sckatchof
-
addEventHandler("onClientGUIClick", root, function () if (source == Buttonbuyskin) then local row,col = guiGridListGetSelectedItem(Sgrid) if (row and col and row ~= -1 and col ~= -1) then local finalskin = guiGridListGetItemText(Sgrid, row, 1 ) triggerServerEvent ( "buySkin", localPlayer, tonumber ( finalskin ) ) else if isTimer ( timer ) then killTimer ( timer ) end guiSetText ( LabelTNS, "Error: Please select a skin from the list." ) timer = setTimer ( guiSetText, 3000, 1, LabelTNS, skinmsglabel ) end end end ) but i change to finaskin
-
in debugscript show WARNIG line 5 variabel nFinalSkin is not number
-
it use it but still line 6 @setElementModel
-
thank guys for help but it still have bad argument line 6 @ setElementModel addEvent("buySkin", true) addEventHandler("buySkin", root, function(finalskin) if source then if (getPlayerMoney(source) >= 350) then setElementModel( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) .. ...
-
thank you sanke again for help it work when i buy skin but it some probelem : :6 :@setElementModel :7 :@setElementModel server side addEvent("buySkin", true) addEventHandler("buySkin", root, function(finalskin) if source then if (getPlayerMoney(source) >= 350) then setElementModel(source,finalskin) setElementData ( source, "clothesSkin", getElementModel ( localPlayer ), true ) takePlayerMoney( source, 350 ) end end end )
-
i want that msg show when i dont selecte for gridlist when i click 'buy skin' without select from list it show ""guiSetText ( LabelTNS, "Error: Please select a skin from the list." ) just for 3 seconed and it back 'skinmsglabel = "Welcome"
-
@ Darken :Loooool cs i don't understand what he want ex @Snake : it dont work it stay "Error: Please select a skin from the list."
-
client side local tnsskinlabel = "Welcome" .. LabelTNS = guiCreateLabel(50,36,220,30,tnsskinlabel,false,Window) ... Buttonbuyskin = guiCreateButton(12,503,122,29,"Buy skin (350$)",false,Window) Buttonclose = guiCreateButton(240,503,117,30,"Exit",false,Window) ... addEventHandler("onClientGUIClick", root, function () if (source == Buttonbuyskin) then local row,col = guiGridListGetSelectedItem(Sgrid) if (row and col and row ~= -1 and col ~= -1) then local finalskin = guiGridListGetItemText(Sgrid, row, 1 ) triggerServerEvent ( "buySkin", localPlayer, tonumber ( finalskin ) ) else if isTimer ( timer ) then killTimer ( timer ) end timer = setTimer ( guiSetText, 3000, 1, LabelTNS, "Error: Please select a skin from the list." ) end end end )
-
local skinmsglabel = "Welcome" .. Sgrid = guiCreateGridList(12,59,345,439,false,Window) ... Buttonbuyskin = guiCreateButton(12,503,122,29,"Buy skin (350$)",false,Window) Buttonclose = guiCreateButton(240,503,117,30,"Exit",false,Window) LabelTNS = guiCreateLabel(50,36,220,30,skinmsglabel ,false,Window) ... addEventHandler("onClientGUIClick", root, function () if (source == Buttonbuyskin) then local row,col = guiGridListGetSelectedItem(Sgrid) if (row and col and row ~= -1 and col ~= -1) then local finalskin = guiGridListGetItemText(Sgrid, row, 1) triggerServerEvent("buySkin",localPlayer,finalskin) else if isTimer(timer) then killTimer(timer) end timer = setTimer(guiSetText(LabelTNS, "Error: Please select a skin from the list."),3000, 1, skinmsglabel ) end end end )
-
thank snake for help work but it show after 3 second guiSetText, 3000, 1, LabelTNS, "Error: Please select a skin from the list." ) i want when i press buy skin it show for 3 second it it back to this local skinmsglabel = "Welcome"
-
hello guys i have 2 problem in shop gui when i buy skin it does not change . client side : local skinmsglabel = "Welcome" .. Sgrid = guiCreateGridList(12,59,345,439,false,Window) ... Buttonbuyskin = guiCreateButton(12,503,122,29,"Buy skin (350$)",false,Window) Buttonclose = guiCreateButton(240,503,117,30,"Exit",false,Window) LabelTNS = guiCreateLabel(50,36,220,30,skinmsglabel ,false,Window) ... addEventHandler("onClientGUIClick", root, function () if (source == Buttonbuyskin) then local row,col = guiGridListGetSelectedItem(Sgrid) if (row and col and row ~= -1 and col ~= -1) then local finalskin = guiGridListGetItemText(Sgrid, row, 1) triggerServerEvent("buySkin",localPlayer,finalskin) else if isTimer(timer) then killTimer(timer) end timer = setTimer(guiSetText(LabelTNS, "Error: Please select a skin from the list."),3000, 1, skinmsglabel ) end end end ) Server side : addEvent("buySkin", true) addEventHandler("buySkin", root, function(finalskin) if source then if (getPlayerMoney(source) >= 350) then setElementModel(source,finalskin) else outputChatBox("You dont have enough money!",source,225,0,0) end end)
-
skin_c.lua:296: Bad argument @ 'getElementModel
-
thanxk tapl for help but it dont work
-
hi guys i have a probelm when i click buy skin it dose not change why client side: .... ... addEventHandler ( "onClientGUIClick", Buttonbuyskin, buySkin ) ..... ... .. function buySkin () local soum = 350 local money = getPlayerMoney(localPlayer) if (money < soum) then outputChatBox ( "You dont have enough money!", 225, 0, 0) else local finalSkinID = guiGridListGetItemText ( SkinGrid, guiGridListGetSelectedItem ( SkinGrid ), 2, 1 ) triggerServerEvent("buySkin", getRootElement(), localPlayer, finalSkinID) end end server side : function buyskin ( thePlayer, finalSkinID ) local skinmodel = getElementModel(finalSkinID) getElementModel(thePlayer, finalSkinID) end addEvent ( "buySkin", true ) addEventHandler ( "buySkin", getRootElement(), buyskin )
-
ok i have make ss for it Pic :
-
when i press button to change password i have warnig at lien 12 function passwordHandler(player, oldpassword, newpassword) local account = getPlayerAccount(player) if (account) then if (isGuestAccount(account)) then outputChatBox("You must be logged in to change your password.", player) return end local accountName = getAccountName ( account ) local password_check = getAccount(accountName, oldpassword) if (password_check ~= false) then if (string.len(newpassword) >= 5) then setAccountPassword(account, newpassword) triggerClientEvent(player, "hidePasswordWindow", getRootElement()) else outputChatBox("Your new password must be at least 5 characters long!", player) end else outputChatBox("Old password invalid.", player) end end end addEvent("submitChangepw", true) addEventHandler("submitChangepw", root, passwordHandler)
-
thank you for help snake but i have WARNIG at line 12
-
yes ofc i added it ...... Buttonchange = guiCreateButton(210,225,136,27,"Change Password",false,WindowChangepw) editOldpw = guiCreateEdit(96,97,184,23,"",false,WindowChangepw) editNewpw = guiCreateEdit(108,129,184,23,"",false,WindowChangepw) .... function clientSubmitChangepw(button, state) if button == "left" and state == "up" then local oldpassword = guiGetText(editOldpw) local newpassword = guiGetText(editNewpw) if oldpassword and newpassword then triggerServerEvent("submitChangepw", getRootElement(), localPlayer, oldpassword, newpassword) else outputChatBox("Enter old and new password.") end end end addEventHandler( "onClientGUIClick", Buttonchange, clientSubmitChangepw, false)
-
client : function clientSubmitChangepw(button, state) if button == "left" and state == "up" then local oldpassword = guiGetText(editOldpw) local newpassword = guiGetText(editNewpw) if oldpassword and newpassword then triggerServerEvent("submitChangepw", getRootElement(), localPlayer, oldpassword, newpassword) else outputChatBox("Enter old and new password.") end end end
-
thank you sanke but why when i write old password and new password dont work ? server side : function passwordHandler(player, oldpassword, newpassword) local account = getPlayerAccount(player) if (account) then if (isGuestAccount(account)) then outputChatBox("You must be logged in to change your password.", player) return end local playerName = getPlayerName(player) local password_check = getAccount(playerName, oldpassword) if (password_check ~= false) then if (string.len(newpassword) >= 5) then setAccountPassword(account, newpassword) triggerClientEvent(player, "hidePasswordWindow", getRootElement()) else outputChatBox("Your new password must be at least 5 characters long!", player) end else outputChatBox("Old password invalid.", player) end end end addEvent("submitChangepw", true) addEventHandler("submitChangepw", root, passwordHandler)
-
Client Side : screenWidth,screenHeight = guiGetScreenSize() mainWidth = 320 mainHeight = 300 windowChangepw = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Change Password",true) TextLabeOld = guiCreateLabel(9,40,84,18,"Old Password :",false,windowChangepw) TextLabelNewPW = guiCreateLabel(9,71,90,19,"New Password :",false,windowChangepw) editOldpw = guiCreateEdit(95,37,196,24,"",false,windowChangepw) editNewpw = guiCreateEdit(99,68,196,24,"",false,windowChangepw) ButtonChange = guiCreateButton(27,130,113,25,"Change it!",false,windowChangepw) ButtonCancel = guiCreateButton(252,130,113,25,"Cancel",false,windowChangepw) guiSetVisible(windowChangepw, false) guiWindowSetMovable(windowChangepw,false) guiWindowSetSizable(windowChangepw,false) guiLabelSetColor(TextLabeOld,150,100,0) addEventHandler( "onClientGUIClick", ButtonCancel, hidewindow ) function changePw() guiSetInputEnabled(true) guiSetVisible(windowChangepw, true) showCursor(true) end addCommandHandler("changepw", changePw)
-
still dont show just Cursor Show when i write the command
-
thank sparrow for help but i still dont show .