Jump to content

Why not work?


Tomek123

Recommended Posts

  • Replies 104
  • Created
  • Last Reply

Top Posters In This Topic

function onPlayerJoinLoadClothes ( ) 
local acc = getPlayerAccount ( source ) 
if acc then 
    for i=0,17 do 
        local texture, model = getPedClothes ( source ) 
        if texture and model then 
            setAccountData(acc, "clothes." .. tostring(i) .. ".texture", texture) 
            setAccountData(acc, "clothes." .. tostring(i) .. ".model", model) 
        end 
    end 
end 
addEventHandler("onPlayerJoin", root, onPlayerJoinLoadClothes) 
  
function onPlayerQuitSaveClothes ( ) 
    local playeracc = getPlayerAccount ( source ) 
    if playeracc then 
        for i=0,17 do 
            local texture, model = getPedClothes ( source ) 
            if texture and model then 
                setAccountData(playeracc, "clothes." .. tostring(i) .. ".texture", texture) 
                setAccountData(playeracc, "clothes." .. tostring(i) .. ".model", model) 
            end 
        end 
    end 
end 
addEventHandler("onPlayerQuit", root, onPlayerQuitSaveClothes) 

Link to comment

This is not for load?

function onPlayerJoinLoadClothes ( ) 
local acc = getPlayerAccount ( source ) 
if acc then 
    for i=0,17 do 
        local texture, model = getPedClothes ( source ) 
        if texture and model then 
            setAccountData(acc, "clothes." .. tostring(i) .. ".texture", texture) 
            setAccountData(acc, "clothes." .. tostring(i) .. ".model", model) 
        end 
    end 
end 
addEventHandler("onPlayerJoin", root, onPlayerJoinLoadClothes) 

Link to comment

Try this...

function onPlayerJoinLoadClothes ( ) 
local acc = getPlayerAccount ( source ) 
    if acc then 
        for i=0,17 do 
            getAccountData(acc, "clothes." .. tostring(i) .. ".texture") 
            getAccountData(acc, "clothes." .. tostring(i) .. ".model") 
            addPedClothes ( source, "clothes." .. tostring(i) .. ".texture", "clothes." .. tostring(i) .. ".texture", i) 
        end 
    end 
end 
addEventHandler("onPlayerJoin", root, onPlayerJoinLoadClothes) 
  
function onPlayerQuitSaveClothes ( ) 
    local playeracc = getPlayerAccount ( source ) 
    if playeracc then 
        for i=0,17 do 
            local texture, model = getPedClothes ( source ) 
            if texture and model then 
                setAccountData(playeracc, "clothes." .. tostring(i) .. ".texture", texture) 
                setAccountData(playeracc, "clothes." .. tostring(i) .. ".model", model) 
            end 
        end 
    end 
end 
addEventHandler("onPlayerQuit", root, onPlayerQuitSaveClothes) 

Link to comment

no work

[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 
[2011-02-13 11:54:53] WARNING: save_clothes\clothes.lua:17: Bad argument @ 'getPedClothes' 

Link to comment

Why this peds don't won't dance?

function pedLoad () 
APed = createPed ( 178, 327.61187744141, 2478.4943847656, 17.784637451172 ) 
BPed = createPed ( 246, 321.29089355469, 2481.6147460938, 17.79061784668 ) 
CPed = createPed ( 87, 321.67388916016, 2476.1999511719, 17.784637451172 ) 
setTimer(setPedRotation,5000,1,APed,270 ) 
setTimer(setPedRotation,5000,1,BPed,225 ) 
setTimer(setPedRotation,5000,1,CPed,315 ) 
setTimer(setPedAnimation,5000,1,APed,"DANCING","DAN_Down_A",-1,true,true,true ) 
setTimer(setPedAnimation,5000,1,BPed,"DANCING","DAN_Left_A",-1,true,true,true ) 
setTimer(setPedAnimation,5000,1,CPed,"DANCING","DAN_Right_A",-1,true,true,true ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) 

Link to comment

I don't know, make it yourself? Search for it on the forums? Look on the community? If you cant type "www.forum.multitheftauto.com" or "www.wiki.multitheftauto.com" then TYPE forum.multitheftauto.com AND wiki.multitheftauto.com! IF YOU WANT TO make A GOOD server, LEARN Lua!

Edited by qaisjp
User has recalled this post
Link to comment

How i can change stats kill?

I try change and not work:

function changekills(thePlayer, commandName) 
    -- Output whether the setPlayerStat was successful in changing the BODY_MUSCLE STAT      
    if setPedStat(thePlayer, 121, 999) then 
        outputChatBox("") 
    else 
        outputChatBox("") 
    end 
end 
addCommandHandler("kills", changekills) 

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