Jump to content

xXGhostXx

Members
  • Posts

    257
  • Joined

  • Last visited

Everything posted by xXGhostXx

  1. Hi guys ! i have a problem ! in this code player have 100$ money and can go to interior but dont have money cant go to interior ! what is problem ? function enter (thePlayer) setElementPosition(thePlayer, 834.66796875, 7.431640625, 1004.1870117188 ) setElementInterior(thePlayer, 3) if (getPlayerMoney(thePlayer)>= 100) then takePlayerMoney(thePlayer, 100) else outputChatBox("#ff0000You Dont Have Enough Money!",thePlayer,255,255,255,true) end end addEventHandler("onMarkerHit",markerJoin,enter)
  2. Please give me just this time
  3. Please edit my main code and give me code !
  4. Hi guys ! Please fix my script for show plate car ! like : players in vehicle click on vehicle show plate ! function pelak(thePlayer) local mashin = getPedOccupiedVehicle(thePlayer) local pelak = getVehiclePlateText(mashin) if isPedInVehicle(thePlayer) then outputChatBox("#00ff00Pelak In Veh "..pelak.." Mibashad!",thePlayer,255,255,255,true) else outputChatBox("#ff0000[Error]:#ffffffShoma Dar Mashin Nistid!",thePlayer,255,255,255,true) end end addCommandHandler("pelak",pelak)
  5. Thanks ! But i have 5000$ in my cash and reset to 800$ because of on player login set player money has it, also skin players like this ! addEventHandler('onPlayerLogin', root, function () spawnPlayer(source, 1286.17578125, -1329.16015625, 13.55211353302) setPlayerSkin(source, 170) setPlayerMoney(source, 800) fadeCamera(source, true) setCameraTarget(source, source) end) please answer me
  6. how players spawn after login ?
  7. I want players use empty command ChatBox : Syntax: /s <Text> Please fix script
  8. What ?! How players join to server ?
  9. No ! i writing game mode ! addEventHandler('onPlayerJoin', root, function () spawnPlayer(source, 1286.17578125, -1329.16015625, 13.55211353302) fadeCamera(source, true) setCameraTarget(source, source) end) local tempSkin; addEventHandler( "onPlayerWasted", getRootElement( ), function() tempSkin = getPlayerSkin ( source ) setTimer( respawnAfterDeath, 3000, 1, source ) end ) function respawnAfterDeath(source) spawnPlayer(source, 1286.17578125, -1329.16015625, 13.55211353302) setPlayerSkin(source, tempSkin) fadeCamera(source, true) setCameraTarget(source, source) end This code for my game mode ! please fix my script
  10. Hi guys ! This code for shout on player chat ! function faryad (thePlayer, cmd, ...) local MetrazhDadZadan = 20 local msg = table.concat({...}, " ") local nick=getPlayerName(player) for _,v in ipairs(getElementsByType("player")) do outputChatBox(nick.." Shout : "..msg,v,255,255,255,true) end end addCommandHandler("s", faryad) Please fix problem code ! Thanks !
  11. Hello ! i Want script for set color name text in chat ! Admin ACL can set color name for players ! like : /setcolorname <PlayerName> <ColorCode> Color code for example : #000000 And save player name color in account data ! please answer me !
  12. Hello guys Please fix my script ------------------------------------------------------------------------------------ -- RIGHTS: All rights reserved by developers -- DEVELOPERS: Oscar Ernesto (The'Oskar) -- Don't Touch This or a Cat will Die D:!!!!!!!! ------------------------------------------------------------------------------------ call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Play Time" ) ---Export of ScoreBoard addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Play Time" , "00:00 " ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Play Time" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Play Time" , "00:00" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Play Time" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function actualizarJugadorOn ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end This code for show play time on score board ! I want to add hours every 10 hours and delete minute from table ! Every 10 hours level set to 1 after 10 hours level set to 2 and ... thanks please answer me
  13. Hello guys ! i have Problem ! On players join on server before download resources can play in server ! how to fix problem ? like : players after download resources can play in server ! please answer me
  14. Hello guys ! What is problem in my code ? function respawnPlayer() fadeCamera(source, true) setTimer( respawnPlayer, 3000, source ) setCameraTarget(source,source) spawnPlayer(source,1286.17578125, -1329.16015625, 13.55211353302,0 , getPedSkin(source), 0, 0) end addEventHandler("onPlayerWasted", getRootElement(), respawnPlayer) Please answer me !
  15. Debug error: ERROR: Loading script failed: guess/server.lua:9: unexpected symbol near '
  16. No ! my question is do you suggest it
×
×
  • Create New...