SkatCh

Members
  • Content Count

    366
  • Joined

  • Last visited

Everything posted by SkatCh

  1. didnit work please help it's an important thing .
  2. SkatCh

    SOLVED

    sorry bro i don't know where is the correct one can u post it here i'm sorry if i waste ur time.
  3. SkatCh

    SOLVED

    nice bro can u please explaine to me how ? , with full script ofc if u have time
  4. every thing is working fine but when the muted player reconnect i got this warning Bad Argument @ 'getElementData' Expected Element at agument 1. function decreaseMutedTime ( player, time ) if not ( isElement ( player ) ) then return; end unmuteTimer[player] = setTimer ( function () local timeLeft = tonumber ( getElementData ( player, "mt" ) ); ---- this line if ( timeLeft == 0 ) then killTimer(unmuteTimer[player]) outputDebugString ( "0 sec left" ); if ( getElementData ( player, "mute" ) ) then outputDebugString ( "is muted" ); setPlayerMuted ( player, false ); setElementData ( player, "mt", 0 ); setElementData ( player, "mute", false ); outputChatBox ( "Your time of being muted has expired.", player, 0, 255, 0 ); outputChatBox ( getPlayerName ( player ) .."'s mute has expired", root, 0, 255, 0 ); unmuteTimer[player] = nil; end else if ( getElementData ( player, "mute" ) ) then -------------- and this line setElementData ( player, "mt", timeLeft - 1 ); end end end, 1000, -1 ); end
  5. Didn't work , please i need help.
  6. thx bro for ur help but didn't work .
  7. bro i try it also i create an other thing but didn't work i don't now why when the player quit the game this warning appear i can fix it by my self but i don't know what's the problem check this ; function decreaseMutedTime(player, time) if (not isElement(player) or not time) then return end local function decreaseTime() local o = tonumber(getElementData(player, "mt")) or 0 local time = o - 1 setElementData(player, "mt", getElementData(player, "mt") - 1) if (time <= 1 and isPlayerMuted(player)) then local time = nil setElementData(player, "mt", false) outputChatBox("You have been unmuted ", player, 255, 255, 0) setPlayerMuted(player, false) setElementData(player, "muteinfo", false) if (isTimer(unmuteTimer[player])) then killTimer(unmuteTimer[player]) end end end unmuteTimer[player] = setTimer(decreaseTime, 1000, tonumber(getElementData(player, "mt"))) end -- onPlayerLogout function checkMuteOnLogout(account) if (not isPlayerMuted(source)) then return end local mutedTime = getElementData(source, "mt") or 0 if (tonumber(mutedTime > 1)) then setAccountData(account, "mt", tonumber(mutedTime)) end end addEventHandler("onPlayerLogout", root, checkMuteOnLogout) and i create this onPlayerLogin function checkMuteOnLogin(account) local mutedTime = getAccountData(account, "mt") or 0 if (tonumber(mutedTime > 1)) then setPlayerMuted(source, true) decreaseMutedTime(source, mutedTime) end end addEventHandler("onPlayerLogin", root, checkMuteOnLogin)
  8. SkatCh

    save problem

    ?? i don't undrestand.
  9. SkatCh

    save problem

    ofc i add it all weapons working fine but simple Note ; just new members when they join i got this error .
  10. SkatCh

    save problem

    guys please i need some help here i create save system for guns but i have small problem here , addEventHandler ( "onPlayerSpawn", root, function () local theAccount = getPlayerAccount ( source ); -- weapons local weapon0 = getAccountData ( theAccount, "weapons.weapon0" ); -- ammo local ammo0 = getAccountData ( theAccount, "weapons.ammo0" ); -- give the weapons if ( weapon0 > 0 ) then giveWeapon ( source, weapon0, ammo0 ); end ----- this line ); the script is working fine but this weapon Fist 0 , when a new player join the server i got this error ; attempt to compare number with boolean .
  11. sorry bro i don't undrestand this can you help me to fix it i'm sorry if i aste ur time .
  12. bro it happen just when the player reconnect i already create a save system to check the player mute time : function checkMuteOnLogout(account) if (not isPlayerMuted(source)) then return end local mutedTime = getElementData(source, "mt") or 0 if (tonumber(mutedTime > 1)) then setAccountData(account, "mt", tonumber(mutedTime)) end end addEventHandler("onPlayerLogout", root, checkMuteOnLogout)
  13. guys please i need some help here i create a mute system but i have some problems when the player reconnect i got some warnings: function decreaseMutedTime ( player, time ) if not ( isElement ( player ) ) then return; end unmuteTimer[player] = setTimer ( function () local timeLeft = tonumber ( getElementData ( player, "mt" ) ); ---- this line if ( timeLeft == 0 ) then killTimer(unmuteTimer[player]) outputDebugString ( "0 sec left" ); if ( getElementData ( player, "mute" ) ) then outputDebugString ( "is muted" ); setPlayerMuted ( player, false ); setElementData ( player, "mt", 0 ); setElementData ( player, "mute", false ); outputChatBox ( "Your time of being muted has expired.", player, 0, 255, 0 ); outputChatBox ( getPlayerName ( player ) .."'s mute has expired", root, 0, 255, 0 ); unmuteTimer[player] = nil; end else if ( getElementData ( player, "mute" ) ) then -------------- and this line setElementData ( player, "mt", timeLeft - 1 ); end end end, 1000, -1 ); end Bad Argument @ 'getElementData' Expected Element at agument one 1. any help
  14. SkatCh

    Destroy marker

    thx castilo nvm i alredy fixed it ... anyways thx for your help.
  15. SkatCh

    Destroy marker

    guys please i need some i create a command to attach a marker to player then i create destroy function , check this it's a part from my script: function destroyMarker (player) for index, m in ipairs ( markers ) do if isElement(markers[index][1]) and markers[index][2] == player then destroyElement (markers[index][1]) break end end end the problems is i want to destroy the marker when the player logout or when the player die . i tried this but didn't work function loggedOut (player) destroyMarker (player) end addEventHandler("onPlayerLogout",getRootElement(),loggedOut) addEventHandler( "onPlayerWasted", getRootElement( ),loggedOut) addEventHandler ( "onPlayerQuit", getRootElement(), loggedOut ) Note i tried the same funtion with CommandHandler and it's working fine. i'm sorry about my english
  16. SkatCh

    GTA SA interiors

    bro i already checked but i don't know how to change the interior dimension.
  17. SkatCh

    GTA SA interiors

    lol i know the folder but i'm asking how ??