[DMC] Posted July 18, 2010 Share Posted July 18, 2010 look i made this but i dont know how to make it just for a certain team? can anyone help me restriction = {} addCommandHandler("911", function(thePlayer) local playerName = getPlayerName(thePlayer) if restriction[playerName] then outputChatBox("Please don't spam 911", thePlayer, 255, 0, 0) else restriction[playerName] = true setTimer(restrictionEnd, 15000, 1, playerName) outputChatBox(playerName .. ' needs Assistance, Police!', getRootElement(), 255, 0, 0) end end ) function restrictionEnd(playerName) restriction[playerName] = nil end Link to comment
50p Posted July 18, 2010 Share Posted July 18, 2010 https://wiki.multitheftauto.com/wiki/GetPlayerTeam https://wiki.multitheftauto.com/wiki/GetTeamFromName Get player's team and check if player's team is the same as the team returned from getTeamFromName. 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