Jump to content

sckatchof

Members
  • Posts

    394
  • Joined

  • Last visited

Everything posted by sckatchof

  1. i copy the code agin and still dont work
  2. thank you for help snake and still dont work
  3. 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)
  4. thank youuuuuuuuuu kenix work
  5. in clothes shop .. .. setElementData ( source, "clothesSkin", finalskin, true ) ...
  6. out put : -> Farm-Town inhabitant 2
  7. know when i do /criminal skin change to CJ skin .
  8. output : typestring debugscript 3 : Error line 6 : assertion failed!
  9. Some problem . @setElementModel
  10. Bad argument @ setElementModel
  11. thnx for help but still dont work
  12. 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)
  13. thank you Keniiiix for help it's work
  14. 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 )
  15. no im not kidding with you and i use your code thnx again but still show WARNIG
  16. 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 )
  17. when i buy a skin it show this WARNIG in consol and in debugscript 3 like this pic : lien :
  18. 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
  19. this msg in debugscript 3 : ... skin_s.lua:5: Bad argument @ 'setElementModel
  20. thanks darken for help but some problem it show in debugscript 3 line 6 setElementModel .
  21. 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 )
  22. thanx keni for help but nothing it show and when i click buy skin nothing it chnage
×
×
  • Create New...