Arrest script help what is wrong


#1

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

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
PlayEntityAnim(“random@arrests@busted”)
elseif IsPedCuffed = true then
PlayEntityAnim(“get_up@cuffed”)
else cancelEvent()
end
end
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!" )
end
end

wat is wrong I dont know need help