Jump to content

need some help


sckatchof

Recommended Posts

Posted

hi guys i have a small problem when i click start shift i want to back to my job team and skin .

when i click start shift skin work but setPlayerTeam dont work

server side :

function onStartShift () 
if source then 
  setPlayerTeam ( source, tonumber( getElementData( source, "oldteam" ) ) ) 
  setElementModel ( source, tonumber( getElementData( source, "clothesjob" ) or 0 ) ) 
outputChatBox( "Test : Start Shift",source,0,0,255 ) 
end 
end 
addEvent("onStartShift",true) 
addEventHandler("onStartShift", root, onStartShift)  

Posted
function onStartShift ( ) 
    setPlayerTeam ( source, getTeamFromName ( tostring ( getElementData ( source, "oldteam" ) ) ) ) -- You we're converting the data to a number. 
    setElementModel ( source, tonumber ( getElementData ( source, "clothesjob" ) or 0 ) ) 
    outputChatBox( "Test : Start Shift",source, 0, 0, 255 ) 
end 
addEvent("onStartShift",true) 
addEventHandler("onStartShift", root, onStartShift)  

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
function onStartShift ( ) 
    setPlayerTeam ( source, tostring ( getElementData ( source, "oldteam" ) ) ) -- You we're converting the data to a number. 
    setElementModel ( source, tonumber ( getElementData ( source, "clothesjob" ) or 0 ) ) 
    outputChatBox( "Test : Start Shift",source, 0, 0, 255 ) 
end 
addEvent("onStartShift",true) 
addEventHandler("onStartShift", root, onStartShift)  

thank you for help snake and still dont work

Posted

My bad, I forgot to use getTeamFromName, copy the code again.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Start debugging your script then, check if the "oldteam" data exists.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Start debugging your script then, check if the "oldteam" data exists.

when i open gui

setElementData ( localPlayer, "oldteam", getTeamName ( localPlayer ) , true ) 

Posted

'oldteam' data is wrong.

setElementData ( localPlayer, 'oldteam', getTeamName ( getPlayerTeam ( localPlayer ) ), true ) 

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

Can you explain in a proper English? I can't understand nothing.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted

EDIT: Kenix was faster

sorry friend

I would like to know how to get a skin.

this case the player get a Team, you can would tell me how to get a skin and a team?

To get player's skin, use:

getElementModel 

for team:

getPlayerTeam 

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