Arrest script help what is wrong


function checkWantedLevel(name, WantedLevel)
TriggerClientEvent(name, command, CheckPlayerWantedLevel)
if commandEntered == "/wanted "…playerName) then
if GetPlayerWantedLevel then
TriggerEvent(‘chatMessage’, …name… " has a wanted level of " …GetPlayerWantedLevel… “!”) – This works only when followed up by the default guide: --> See change of chat resource!
else cancelEvent()

function tazed (player, weapon)
weapon = "stun_gun"
if IsHitBy(weapon) then
local player = GetPlayerPed(-1)
FreezeEntityPosition(player, true) then
SetPedToRagdollWithFall(player, PlayerPed)
if IsPedRagdoll(GetPlayerPed(-1))

function arrest(commandEntered, player)
TriggerClientEvent(arrest, command, player)
if commandEntered("/arrest" …PlayerName) then
local playerName = GetPlayerName(source)
local arrestPed = TaskArrestPed(player, target)
if IsPedBeingArrested(player) = true then
elseif IsPedCuffed = true then
else cancelEvent()
addEventHandler(arrest, thePlayer)

server side above is the client side

local players = GetElementType ( “player” ) – get a table of all the players in the server
for theKey,player in ipairs(players) do – use a generic for loop to step through each player
local level = GetWantedLevel ( player ) – get the wanted level of the player
if ( level > (WantedLevel) ) then – if the player has any stars, announce it in the chat:
print ( GetPlayerName ( name ) … " has a wanted level of " … level … " stars!" )

wat is wrong I dont know need help