Jump to content

help


Recommended Posts

Posted

hi guys i have problem output dose not show why ?

this is server side part :

  
     function( skin, playername ) 
        local player = getPlayerFromName(playername) 
        if ( player ) then 
                  setElementModel(player, skin) 
            outputChatBox ( "'"..getPlayerName( source ).."' changed your skin to '"..skin.."'!", player, 255, 100, 70 ) 
            else 
            outputChatBox ( "Invalid Nick", source, 255, 0, 0 ) 
end 
end 
  

Posted (edited)
hi guys i have problem output dose not show why ?

this is server side part :

  
     function( skin, playername ) 
        local player = getPlayerFromName(playername) 
        if ( player ) then 
                  setElementModel(player, skin) 
            outputChatBox ( "'"..getPlayerName( source ).."' changed your skin to '"..skin.."'!", player, 255, 100, 70 ) 
            else 
            outputChatBox ( "Invalid Nick", source, 255, 0, 0 ) 
end 
end 
  

source nil.

and what is it

function( skin, playername ) 

!?

Also tabulate your code please.

Edited by Guest

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted (edited)
This is an event, command or what?

That's a non-sense script :D

You may want:

addCommandHandler ( 'skin',  
    function ( uPed, uCommand, uSkin ) 
     
        if ( not uSkin ) then 
            return 
        end 
         
        setElementModel ( uPed, tonumber ( uSkin ) ) 
        outputChatBox ( getPlayerName ( uPed ) .. ' has changed his skin to ' .. uSkin, root, 255, 255, 255, false ) 
         
    end 
) 

Edited by Guest

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

here:

function( skin, playername ) 
    local player = getPlayerFromName(playername) 
    if ( player ) then 
        setElementModel(player, skin) --set the player skin to the skin they wanted 
        outputChatBox ( "'"..getPlayerName(player).."' changed your skin to '"..tostring(skin).."'!", player, 255, 100, 70 ) --output that they have changed their skin 
    else 
        outputChatBox ( "Invalid Nick", player, 255, 0, 0 )  
    end 
end 

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Posted
here:
function( skin, playername ) 
    local player = getPlayerFromName(playername) 
    if ( player ) then 
        setElementModel(player, skin) --set the player skin to the skin they wanted 
        outputChatBox ( "'"..getPlayerName(player).."' changed your skin to '"..tostring(skin).."'!", player, 255, 100, 70 ) --output that they have changed their skin 
    else 
        outputChatBox ( "Invalid Nick", player, 255, 0, 0 )  
    end 
end 

That makes no-sense anyway.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

I gave him what it seems to be, your and him code makes no sense with no attached command, event, nothing.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

LOL? Is there any problem is showing us handlers or explain what he are trying to do?

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

If we don't know what's source, how we will help him?

And please, stop posting if you don't understand.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...