From 4352f389f99c4aa637f383e18f0b4927c9af2ef6 Mon Sep 17 00:00:00 2001 From: metrakit Date: Fri, 10 May 2019 22:18:03 +0200 Subject: [PATCH] fix I18N issue #2 & fix esx example #1 --- vote/example.lua | 3 +++ vote/example_esx.lua | 29 ++++++++++++++++++++++++----- vote/lib/VotePlugin.net.dll | Bin 11264 -> 11264 bytes 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/vote/example.lua b/vote/example.lua index 8b77fd1..0505869 100644 --- a/vote/example.lua +++ b/vote/example.lua @@ -1,3 +1,6 @@ +-- Ceci est un exemple basique permettant un affiche des détails du vote en console +-- C'est seulement une demo, à vous de modifier à votre convenance. + AddEventHandler('onPlayerVote', function (playername, ip, date) print(playername) print(ip) diff --git a/vote/example_esx.lua b/vote/example_esx.lua index deecec2..d7aaa3a 100644 --- a/vote/example_esx.lua +++ b/vote/example_esx.lua @@ -1,3 +1,9 @@ +-- Ceci est un exemple basique utilisant ESX. +-- C'est seulement une demo, à vous de modifier à votre convenance. + +ESX = nil +TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + local function getPlayerByName(playername) local xPlayers = ESX.GetPlayers() for i=1, #xPlayers, 1 do @@ -11,12 +17,25 @@ end AddEventHandler('onPlayerVote', function (playername, ip, date) local player = getPlayerByName(playername) - if player then - player.addMoney(100) + if Player then + Player.addMoney(100) + + -- Pour notifier (requiert pNotify) : + -- TriggerClientEvent("pNotify:SendNotification", -1, { + -- text = ""..playername.. " a voté pour le serveur
Il a gagné 100$", + -- type = "info", + -- timeout = 15000, + -- layout = "centerRight" + -- }) else print("Joueur introuvable !") + + -- Pour notifier (requiert pNotify) : + -- TriggerClientEvent("pNotify:SendNotification", -1, { + -- text = "Un inconnu a voté pour le serveur !", + -- type = "info", + -- timeout = 15000, + -- layout = "centerRight" + -- }) end - print(playername) - print(ip) - print(date) end) diff --git a/vote/lib/VotePlugin.net.dll b/vote/lib/VotePlugin.net.dll index 9e9f80d0ae1e9bc062e0fe7eebf540bd24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