Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 15/06/20 in all areas

  1. Vc está precisando estudar mais lógica de programação. Pois em ambos os casos vc saberia se soubesse lógica de programação. Isso não aparece diretamente na Wiki pois não se trata de funções nem eventos do MTA. Assim como não aparece nada diretamente relacionado a if, elseif e else. for i,v in ipairs (getElementsByType ("player")) do outputChatBox (getPlayerName(v)) end Isso é um loop que passa por todos os jogadores conectados no servidor. É usado quando vc quer executar o código repetidas vezes para cada jogador. No exemplo acima, ele manda no chat os nicks de cada jogador conectado no servidor. (Manda no chat os nomes de todos os elementos do tipo "player") Sobre sua outra pergunta: veh[player] só existe se veh for uma tabela e ela possuir algum item indexado com o valor da variável player. local veh = {} -- Cria a tabela veh vazia. addCommandHandler ("carro", function (thePlayer)) -- Script server-side, thePlayer é o jogador que executou o comando /carro veh[thePlayer] = createVehicle ()... -- Cria um veículo, adiciona esse veículo na tabela e usa o jogador como índice. end) thePlayer não existirá fora dessa função. Mas veh[thePlayer] ainda pode ser acessado em outras partes do script usando outra variável no lugar de thePlayer, desde que ela seja o mesmo jogador.
    1 point
  2. O erro está dizendo que receiver é booleano (false). Pois vc não declarou id em lugar nenhum. Então a função getPlayerFromAccountID retornou false em vez de um jogador.
    1 point
  3. Try this:- --server function getplayer() triggerClientEvent(root,"randomPlayer",root,getRandomPlayer() ) end addEvent("getplayer", true) addEventHandler("getplayer" , resourceRoot, getplayer ) -- client function checkPlayer(commandName) triggerServerEvent("getplayer", resourceRoot) end addCommandHandler("check", checkPlayer) function randomPlayer (player) outputChatBox ( "The player is " .. player ) end addEvent("randomPlayer", true) addEventHandler("randomPlayer" , resourceRoot, randomPlayer) Or you can try this better --server function randomPlayer (playerSource, commandName ) triggerClientEvent(playerSource ,"checkplayer", playerSource, getRandomPlayer() ) end addCommandHandler("check", randomPlayer) --client function checkPlayer (player) outputChatBox("The player is "..player ) end addEvent("checkplayer", true) addEventHandler ("checkplayer", localPlayer, checkplayer)
    1 point
  4. لما ادخل بي سي راح ارسل روابط تقريبا عندي https://top4top.io/downloadf-7718gbic1-zip.html رابط واحد بس يشتغل باقي محذوفه لاكن هوا كان يرجع ام تي اي راح يبداع من جديد،لاكن اعتزال ?
    1 point
  5. As one of the developers behind SAES:RPG, the server in question appears to not use any leaked scripts from SAES:RPG (I did a brief check). And it's not like SAES has patented / has a trademark on the idea of our gamemode, so anyone is free to make a gamemode in the same general spirit / idea. With that said, I wish you guys the best of luck.
    1 point
  6. Resource de Segurança: Resource protegido: Obviamente o meu sistema de segurança é mais avançado do que este. Mas já resolve seus problemas.
    1 point
×
×
  • Create New...