
sckatchof
Members-
Posts
394 -
Joined
-
Last visited
Everything posted by sckatchof
-
i copy the code agin and still dont work
-
thank you for help snake and still dont work
-
hi guys i have a small problem when i click start shift i want to back to my job team and skin . when i click start shift skin work but setPlayerTeam dont work server side : function onStartShift () if source then setPlayerTeam ( source, tonumber( getElementData( source, "oldteam" ) ) ) setElementModel ( source, tonumber( getElementData( source, "clothesjob" ) or 0 ) ) outputChatBox( "Test : Start Shift",source,0,0,255 ) end end addEvent("onStartShift",true) addEventHandler("onStartShift", root, onStartShift)
-
thank youuuuuuuuuu kenix work
-
in clothes shop .. .. setElementData ( source, "clothesSkin", finalskin, true ) ...
-
out put : -> Farm-Town inhabitant 2
-
know when i do /criminal skin change to CJ skin .
-
output : typestring debugscript 3 : Error line 6 : assertion failed!
-
Some problem . @setElementModel
-
Bad argument @ setElementModel
-
thnx for help but still dont work
-
hi guys i have make a clothes shop but when i worked in other work the skin change to skin job like police job and i want when i do /criminal my skin change to when i buy skin from clothes shop server side : criminalTeam = createTeam ("Criminal", 255, 0, 0) function joinTeam (thePlayer) setPlayerTeam ( thePlayer, criminalTeam ) setElementModel ( thePlayer, tonumber( getElementData( thePlayer, "clothesSkin" ) ) outputChatBox ( "You are now a criminal.",source, 0, 255, 0 ) end addCommandHandler ("criminal", joinTeam)
-
thank you Keniiiix for help it's work
-
server side : addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( fSkin ) if ( getPlayerMoney ( source ) >= 350 ) then setElementModel ( source, fSkin ) setElementData ( source, "clothesSkin", fSkin, true ) outputChatBox ( "You have sucessfully bought the skin!", source, 255, 255, 255, false ) else outputChatBox ( "You don't have enough money!", source, 225, 0, 0, false ) end end ) client : ... .. Sgrid = guiCreateGridList(12,59,345,439,false,SkinWindow) .. Buttonbuyskin = guiCreateButton(12,503,122,29,"Buy skin (350$)",false,SkinWindow) .. addEventHandler( 'onClientGUIClick', root, function( ) if ( source == Buttonbuyskin ) then assert( Sgrid, 'Grid list not exists' ) local nRow = guiGridListGetSelectedItem( Sgrid ) if ( nRow and nRow ~= -1 ) then local finalskin = guiGridListGetItemText( Sgrid, nRow, 1 ) triggerServerEvent ( 'buySkin', localPlayer, tonumber ( finalskin ) ) outputChatBox("You have successfully bought the skin!",source,225,255,255) else if isTimer ( timer ) then killTimer ( timer ) end guiSetText ( LabelTNS, 'Error: Please select a skin from the list.' ) timer = setTimer ( guiSetText, 3000, 1, skinmsgla, LabelTNS ) end end end )
-
no im not kidding with you and i use your code thnx again but still show WARNIG
-
addEvent("buySkin", true) addEventHandler("buySkin", root, function(finalskin) if source then if (getPlayerMoney(source) >= 350) then outputChatBox ( type ( finalskin ) ..": ".. tostring ( finalskin ) ) setElementModel ( source, tonumber ( finalskin ) ) setElementData ( source, "clothesSkin", finalskin, true ) outputChatBox("You have successfully bought the skin!",source,225,255,255) else outputChatBox("You dont have enough money!",source,225,0,0) end end end )
-
when i buy a skin it show this WARNIG in consol and in debugscript 3 like this pic : lien :
-
i dont have any error it's work when i buy skin but it show in debugscript 3 this msg : ...skin_s.lua:5: Bad argument @ 'setElementModel
-
this msg in debugscript 3 : ... skin_s.lua:5: Bad argument @ 'setElementModel
-
thanks darken for help but some problem it show in debugscript 3 line 6 setElementModel .
-
thank you kenix
-
Client side work but i have proble in server side in line 5 ==> setElementModel( source, finalskin ) client side : addEventHandler( 'onClientGUIClick', root, function( ) if source == Buttonbuyskin then assert( Sgrid, 'Grid list not exists' ) local nRow = guiGridListGetSelectedItem( Sgrid ) if nRow and nRow ~= -1 then local finalskin = guiGridListGetItemText( Sgrid, nRow, 1 ) assert( finalskin, 'Variable finalskin is false or nil.' ) triggerServerEvent ( 'buySkin', localPlayer, tonumber ( finalskin ) ) outputChatBox("You have successfully bought the skin!",source,225,255,255) 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 ) addEvent("buySkin", true) addEventHandler("buySkin", root, function(finalskin) if source then if (getPlayerMoney(source) >= 350) then setElementModel( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) outputChatBox("You have successfully bought the skin!",source,225,255,255) else outputChatBox("You dont have enough money!",source,225,0,0) end end end )
-
thanx keni for help but nothing it show and when i click buy skin nothing it chnage