Jump to content

CJ Change Clothes Script Bad Arg.


Recommended Posts

addCommandHandler('cj', root,--- the Command 
function() 
addPedClothes ( source, "moto", "moto", 16 )--- you have put the type of the Clothes 
setElementModel(source,0) -----small edit to make the skin cj  
outputChatBox('Clothes Changed',255,255,0)--- in ClientSide source not needed 
end) 

Read Comments and read this before Make a new topic

http://wiki.multitheftauto.com/wiki/AddPedClothes

:P

Lol Mate I Want People To Be Able To Customize There CJ Skin not Give Them A Helmet :/

Link to comment

No base argument for addCommandHandler. You're using source, which isn't defined. outputChatBox missing forWho argument.

addCommandHandler('cj',--- the Command 
function(player) 
setElementModel(player,0) -----small edit to make the skin cj 
addPedClothes ( player, "moto", "moto", 16 )--- you have put the type of the Clothes 
outputChatBox('Clothes Changed',player,255,255,0)--- in ClientSide source not needed 
end) 

EDIT:

Lol Mate I Want People To Be Able To Customize There CJ Skin not Give Them A Helmet :/

I suggest a GUI for that, because they might type in anything.

Link to comment
Guest Guest4401
function cj(player,command,texture,model,cType) 
    if texture and model and cType then 
        if not tonumber(cType) then outputChatBox("Model must be a number",player) return end 
        if getElementModel(player) == 0 then 
            if addPedClothes(player,texture,model,tonumber(cType)) then 
                outputChatBox("Clothes Changed",player) 
            else 
                outputChatBox("Texture, model or type doesn't exist. Please re-check list: #abcdefhttp://wiki.multitheftauto.com/wiki/CJ_Clothes",player,255,255,255,true) 
            end 
        else 
            outputChatBox("Only CJ can change clothes",player) 
        end 
    else 
        outputChatBox("Wrong syntax. Use: /cj Texture Model Type",player) 
    end 
end 
addCommandHandler("cj",cj) 

Type: /cj clothesTexture clothesModel clothesType

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