Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Kenix

    some help .

    Ah It's incorrect you need use in 3 argument ( setElementData ) numbers or string with numbers. Where you set this data?
  2. Kenix

    some help .

    I know. What output in chat?
  3. Kenix

    some help .

    uCriminalTeam = createTeam ( 'Criminal', 255, 0, 0 ) function fJoinTeam ( uPlayer ) setPlayerTeam ( uPlayer, uCriminalTeam ) outputChatBox( '->' .. tostring( getElementData( uPlayer, 'clothesSkin' ) ) ) setElementModel ( uPlayer, tonumber( getElementData( uPlayer, 'clothesSkin' ) ) or 0 ) outputChatBox ( 'You are now a criminal.', uPlayer, 0, 255, 0 ) end addCommandHandler ( 'criminal', fJoinTeam ) Debug it. I think your data 'clothesSkin' not defined.
  4. Kenix

    some help .

    uCriminalTeam = createTeam ( 'Criminal', 255, 0, 0 ) function fJoinTeam ( uPlayer ) setPlayerTeam ( uPlayer, uCriminalTeam ) setElementModel ( uPlayer, tonumber( getElementData( uPlayer, 'clothesSkin' ) or 0 ) ) outputChatBox ( 'You are now a criminal.', uPlayer, 0, 255, 0 ) end addCommandHandler ( 'criminal', fJoinTeam ) Your data 'clothesSkin' not have value.
  5. Kenix

    some help .

    uCriminalTeam = createTeam ( 'Criminal', 255, 0, 0 ) function fJoinTeam ( uPlayer ) setPlayerTeam ( uPlayer, uCriminalTeam ) setElementModel ( uPlayer, tonumber( getElementData( uPlayer, 'clothesSkin' ) ) ) outputChatBox ( 'You are now a criminal.', uPlayer, 0, 255, 0 ) end addCommandHandler ( 'criminal', fJoinTeam ) You forgot close function and in line 6 source is not defined. Predefined variable source used only in function handler event.
  6. Kenix

    Need help

    Upload resource.
  7. Kenix

    don t work!!

    You use pro skill? It should work.
  8. Kenix

    don t work!!

    scripter_new, You use in server side?
  9. Kenix

    Need help

    Try check all conditions with functions : outputChatBox outputDebugString
  10. Kenix

    Need help

    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 ) ) 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 ) Test it and show output debug messages.
  11. Kenix

    Need help

    OK show how you trigger event buySkin.
  12. Kenix

    Need help

    Show how you trigger event buySkin.
  13. В freeroam'e можешь поискать.
  14. local tPeds = { } addCommandHandler ( 'ped', function( uPlayer, _ ) local nX, nY, nZ = getElementPosition ( uPlayer ) tPeds[1] = createPed ( 26,nX + 2, nY + 2, nZ + 2, 90 ) --Турист end ) addCommandHandler ( 'hat', function( uPlayer, _, sBlock, sAnim ) setPedAnimation( tPeds[1], sBlock, sAnim ) end ) ped = {} function pedCreate (player,commandName) px,py,pz = getElementPosition (player) ped[1] = createPed ( 26,px+2,py+2, pz+2, 90)--Турист end addCommandHandler ( "ped",pedCreate) function car_perevoz (player,commandName,blok,anim) setPedAnimation(ped[1],block,anim) -- Переменной block не существует. Дебаг бы сказал об этом. end addCommandHandler ( "hat",car_perevoz ) Изай /debugscript 3 в следующее время.
  15. Kenix

    Need help

    addEvent ( 'buySkin', true ) addEventHandler ( 'buySkin', root, function ( nFinalSkin ) if getPlayerMoney( source ) >= 350 then assert ( type ( nFinalSkin ) == 'number', 'Variable nFinalSkin is not number' ) assert( isElement( source ) and getElementType( source ) == 'player', 'source is not player element' ) setElementModel ( source, nFinalSkin ) setElementData ( source, 'clothesSkin', nFinalSkin, true ) takePlayerMoney ( source, 350 ) end end ) All errors you can see in debug ( type /debugscript 3 ).
×
×
  • Create New...