Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. You not define this variable: animfunc
  2. He not showed source code function IsPlayerSuperAdmin. I'm not a telepathist. Server side: Player login -> if player admin then set data 'Admin' and etc. Client side: just check what return data.
  3. function redirect1(player) redirectPlayer(player, "94.23.38.142", "22003") -- 22003 should be number ( not string ) i said about this outputChatBox ("*#000000 [ #FF0000"..getPlayerName(source) .." #000000]#FFFF00 Has turning to the Zombie Server #ff0000!!",getRootElement(), 255, 0, 0, true ) -- source not defined here. You should use player variable. end addCommandHandler("zombie",redirect1) function chat() outputChatBox ("#FFff00~@ #00bbccTyp #000000[ #ff0000/zombie #000000] #00bbccTo connect to The#000000: #ff0000Zombie #00bbccServer #ffff00 @~",getRootElement(), 255, 255, 255, true ) end setTimer ( chat, 60000, 0) Read comments.
  4. Kenix

    random skin

    I don't understand what you mean. Explain better please.
  5. Handler function parameters I guess you understand Correct code addCommandHandler( 'freeroam', function( pPlayer ) redirectPlayer( pPlayer, '94.23.38.142', 22006 ) end )
  6. In your code you convert number to number. It's not needed. In Wiki example string converted to number.
  7. Read my comments. I said mistakes.
  8. Why convert number to number in this case?
  9. source is not defined in arguments command handler-function! 3 argument should be number ( not string ).
  10. function redirect() -- You not added source to arguments function. redirectPlayer(source, "94.23.38.142", tonumber(22006)) -- Why convert number to number in this case? end addCommandHandler("freeroam",redirect) JasperRieken Read comments.
  11. Kenix

    problem

    This line return boolean instead of player element. local dPlayer = getPlayerFromName( sPlayer ) Player not found.
  12. Use setElementData getElementData
  13. This condition doesn't exists Syntax error.It's correct. if weapon >= 0 and weapon <= 40 then
  14. Kenix

    robber error

    I showed you mistakes. You should fix it. Also i not understand what you want make? Explain please details.
  15. https://community.multitheftauto.com/index.php?p= ... ls&id=4839 https://community.multitheftauto.com/index.php?p= ... ls&id=4838
  16. Explain better. I not understand. Also your code wrong. bindKey ( player, "F1", "down", funcInput ) bindKey ( player, "F1", "up", funcInput ) Read wiki.
  17. Kenix

    robber error

    setPlayerTeam ( localPlayer, robberTeam ) What this? addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end ) And this https://wiki.multitheftauto.com/wiki/Scr ... troduction
  18. https://wiki.multitheftauto.com/wiki/OnClientGUIScroll https://wiki.multitheftauto.com/wiki/MoveObject
  19. It should work. I tested it. Working perfectly in play gamemode. Try use timer. Also use /debugscript 3.
  20. Alpha, blazy both code is wrong. Read wiki better. onPlayerSpawn-> first argument is position axis x ( not element ) onPlayerWasted-> first argument is killer( but we not needed killer. Only wasted player we need ) local function Skin( ) if eventName == 'onPlayerSpawn' then local nData = getElementData( source, 'save-skin' ) if nData then setElementModel( source, nData ) end else setElementData( source, 'save-skin', getElementModel( source ) ) end end addEventHandler( 'onPlayerWasted', root, Skin ) addEventHandler( 'onPlayerSpawn', root, Skin )
  21. Begin viewtopic.php?f=148&t=40809 -> https://wiki.multitheftauto.com/wiki/Scr ... troduction
  22. Kenix

    explain me please

    P.S Define indexes is optional in table local Array = { { '1' }; [ 2 ] = { [ 1 ] = '2' }; } print( Array[ 1 ][ 1 ] ) -- 1 print( Array[ 2 ][ 1 ] ) -- 2 Index auto-defined from 1.
×
×
  • Create New...