Ir para conteúdo

Featured Replies

Postado

daria

Editado por Sun (veja o histórico de edições)

                                                                                                                  Have no idea!

                                                                                                  freelance? go to my discord:  sun#8860

 

  • Respostas 11
  • Visualizações 747
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Em talkactions/scripts crie uma arquivo chamado addpoints.lua e cole \/ function onSay(cid, words, param) local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, ME

  • function onSay(cid, words, param, channel) local t = string.explode(param, ",") local id = getPlayerGUIDByName(t[1]) local tid = getPlayerByNameWildcard(t[1]) if not t[1] then doPlayerSendTex

Posted Images

Postado
13 horas atrás, Nother disse:

Tem como alterar esse script para entregar os pontos direto para a mão do player mesmo que ele esteja offline? Talvez assim resolva

function onSay(cid, words, param, channel)

	local t = string.explode(param, ",")
	local id = getPlayerGUIDByName(t[1])
	local tid = getPlayerByNameWildcard(t[1])
	
	if not t[1] then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found!.")
		return true
	end
	
	if t[1] ~= id then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not exist.")
		return true
	end
	
	if not t[2] then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "unspecified amount.")
		return true
	end

	  if tid then
		  setPlayerStorageValue(tid, 15555, getPlayerStorageValue(cid, 15555) + t[2])
		  doSendAnimatedText(getPlayerPosition(tid), "+" .. t[2] .. " points.", COLOR_DARKYELLOW)
	  else
		  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este jogador está offline, mas recebeu os " .. t[2] .. " points.")
		  db.executeQuery("INSERT INTO `player_storage`(player_id, key, value) VALUES(" .. id .. ", " .. 15555 .. ", " .. t[2] .. ");")
		end
	return true
end

 

troque seu addpoints por este acima, ele irá adicionar points mesmo se o jogador estiver Off

                                                                                                                  Have no idea!

                                                                                                  freelance? go to my discord:  sun#8860

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo