I'm need a mod which is give money to players in team. Like: if someone in police team, he get 20000$, but if player don't have team or in criminal team, he don't get money.
This is my script for this, but it isn't good:
function tekmoney ()
local money = 20000
local playerTeam = getTeamName ( theTeam )
for id, player in ipairs(getElementsByType("player")) do
if getTeamName ( theTeam ) == "TEK" then
givePlayerMoney ( player, money )
outputChatBox ( "[TEAM] Money received.", getRootElement(), 255, 255, 255, true )
end
end
end
setTimer ( tekmoney, 5000, 0)