Micro Posted December 22, 2012 Share Posted December 22, 2012 Hello , this code : function startTheResource (thePlayer, command, resourceName ) if ( resourceName ) then -- Check if they specified a resource name local resource = getResourceFromName (resourceName) -- Get the resource getplayer = getPlayerName(thePlayer) if getplayer then local start = startResource (resource) -- Start the resource if ( start ) then -- If it was successfully started... outputChatBox ( resourceName .. " was started successfully.", thePlayer, 255, 0, 0 ) else -- If it wasn't successfully started... outputChatBox ( "This resource doesn't exist.", thePlayer, 255, 0, 0 ) end end else -- If they didn't put a resource name... outputChatBox ( "Please specify a resource to start.", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "resource-start", startTheResource ) ineed if player say in chat resource-start userpanel only the userpanel start to this player Link to comment
tigerman Posted December 22, 2012 Share Posted December 22, 2012 Hello , this code : function startTheResource (thePlayer, command, resourceName ) if ( resourceName ) then -- Check if they specified a resource name local resource = getResourceFromName (resourceName) -- Get the resource getplayer = getPlayerName(thePlayer) if getplayer then local start = startResource (resource) -- Start the resource if ( start ) then -- If it was successfully started... outputChatBox ( resourceName .. " was started successfully.", thePlayer, 255, 0, 0 ) else -- If it wasn't successfully started... outputChatBox ( "This resource doesn't exist.", thePlayer, 255, 0, 0 ) end end else -- If they didn't put a resource name... outputChatBox ( "Please specify a resource to start.", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "resource-start", startTheResource ) ineed if player say in chat resource-start userpanel only the userpanel start to this player startResource is global, you cant start resource just for one player with that. Link to comment
iPrestege Posted December 22, 2012 Share Posted December 22, 2012 It is impossible to do this . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now