Prat Posted August 15, 2013 Posted August 15, 2013 Hi guys today i tried to make this script, but itsn't working , i tried to delete those Team function but it works. so all i need to do is: when you do /gobase you warp to the base , /gobase only work for "staff" team only. here is the script function staffwarp (thePlayer ,command) if getTeamName(getPlayerTeam(thePlayer)) == "Staff" then setElementPosition ( thePlayer, 2454.7448730469, 1441.8331298828, 10.90625) sendClientMessage ( "You succesfuly warped to Staff Base", thePlayer, 0, 255, 0, true ) else outputChatBox ("You don't have access for this command", thePlayer, 255, 0, 0) end addCommandHandler ("gobase", staffwarp)
tosfera Posted August 15, 2013 Posted August 15, 2013 You should try this; if ( getPlayerTeam ( thePlayer ) == getTeamFromName( "Staff" ) ) then
isa_Khamdan Posted August 15, 2013 Posted August 15, 2013 try this function staffwarp (thePlayer ,command) local playerTeam = getPlayerTeam ( thePlayer ) == getTeamFromName( "Staff" ) if ( playerTeam ) then setElementPosition ( thePlayer, 2454.7448730469, 1441.8331298828, 10.90625) sendClientMessage ( "You succesfuly warped to Staff Base", thePlayer, 0, 255, 0, true ) else outputChatBox ("You don't have access for this command", thePlayer, 255, 0, 0) end addCommandHandler ("gobase", staffwarp)
Booo Posted August 15, 2013 Posted August 15, 2013 Hi guystoday i tried to make this script, but itsn't working , i tried to delete those Team function but it works. so all i need to do is: when you do /gobase you warp to the base , /gobase only work for "staff" team only. here is the script function staffwarp (thePlayer ,command) if getTeamName(getPlayerTeam(thePlayer)) == "Staff" then setElementPosition ( thePlayer, 2454.7448730469, 1441.8331298828, 10.90625) sendClientMessage ( "You succesfuly warped to Staff Base", thePlayer, 0, 255, 0, true ) else outputChatBox ("You don't have access for this command", thePlayer, 255, 0, 0) end addCommandHandler ("gobase", staffwarp) function staffwarp (thePlayer ,command) if getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) == "Staff" then setElementPosition ( thePlayer, 2454.7448730469, 1441.8331298828, 10.90625) sendClientMessage ( "You succesfuly warped to Staff Base", thePlayer, 0, 255, 0, true ) else outputChatBox ("You don't have access for this command", thePlayer, 255, 0, 0) end end addCommandHandler ("gobase", staffwarp
tosfera Posted August 15, 2013 Posted August 15, 2013 Ahh I see, we are recreating his command? Cool; addCommandHandler ( "gobase", function ( thePlayer, command ) if ( getPlayerTeam ( thePlayer ) ) then if ( getPlayerTeam ( thePlayer ) == getTeamFromName ( "Staff" ) ) then setElementPosition ( thePlayer, 2454.7448730469, 1441.8331298828, 10.90625); outputChatBox ( "You succesfuly warped to Staff Base", thePlayer, 0, 255, 0, true ); else outputChatBox( "You do not have the required access for this command.", thePlayer, 255, 0, 0, true ); end end end );
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