Jump to content

help


Recommended Posts

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 
  

Link to comment
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
Link to comment
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
Link to comment

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 

Link to comment
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.

Link to comment

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...