-
Posts
1,804 -
Joined
-
Last visited
-
Days Won
8
Citizen last won the day on June 13 2022
Citizen had the most liked content!
About Citizen
- Birthday 12/07/1993
Member Title
- Moderator
Details
-
Gang
Byston Evolution
-
Location
Lyon ( France )
-
Interests
Lua,C/C++,HTML,PHP, mySQL,Basic,C#,JAVA,js and MTA of Course ^^
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Citizen's Achievements
Jacker (39/54)
55
Reputation
-
Citizen started following Palm City Stories Roleplay
-
Salut @Ea7gign, Quel est le statut du serveur ? il est ouvert ou en cours de développement ? Tu peux aussi faire de la pub sur le discord MTA https://discord.gg/mtasa , Channel #fr-pubs si tu le désires Bon courage !
-
Citizen reacted to a post in a topic:
Goodbye MTA
-
<""servername>Default MTA Server</<"servername"> Should be <servername>Default MTA Server</servername>
-
Hello @BigBoss1234, Don't use the Tutorial section to ask scripting questions. Your topic has been moved to the Scripting section and approved so other members can now see it. Using the right section for your post next time will reduce the waiting time for an actual answer. PS: Also embed your lua code in a script block so it is easier to read. It's greatly appreciated in the community when OP does so (I edited your post for you) Best regards,
-
Citizen reacted to a post in a topic:
Interview with IJs - the founder of MTA
-
Citizen reacted to a post in a topic:
Interview with IJs - the founder of MTA
-
You have a service named "cFosSpeed System Service" running. Disable it.
-
Citizen reacted to a post in a topic:
[REL] NandoCrypt - File Encryption Resource
-
Citizen reacted to a post in a topic:
[REL] Add New Models (Library)
-
Citizen reacted to a post in a topic:
[BAN AMNESTY] Everyone got unbanned
-
Marcel Assink started following Citizen
-
Hello @Wananazo, Your topic is not a tutorial so it has been moved to the Scripting Section. Tutorials section is only meant for tutorials. Make sure to post your next topic to this section when asking for help with scripts. Also make sure to paste code in code blocks (I edited your post to fix that) Best regards,
-
Citizen reacted to a post in a topic:
not working Alpha
-
Mr.Hugin reacted to a post in a topic:
Ajuda com script de config?
-
@Mr.Hugin sendDiscordMessage doesn't exist (rename the function at line 3 from msg to sendDiscordMessage)
-
Hello, I moved your topic to the Scripting section. The Tutorials section is only for Scripting Tutorials, for scripting questions, use the Scripting section instead. Make sure to use this section for your next scripting questions. I also edited your code to hide your discord webhook id and secret, never share it or someone else can send message to the targeted discord channel.
-
je recherche un scripteur, un mappeur, gm pour rp
Citizen replied to Kratos_26000's topic in French / Français
@Shady1Il n'est pas en train de demander de l'aide pour créer un système spécifique, il cherche à monter une équipe pour créer un serveur roleplay et il recherche donc des personnes pour scripter et mapper son serveur. @Kratos_26000Bienvenue sur le forum et bonne chance pour ta recherche. Pour être transparent, il n'y a pas beaucoup de personnes dans la section FR du forum/discord, et en général ces personnes sont déjà prises sur d'autres projets ou n'ont plus le temps suffisant pour se lancer dans de nouveaux. Mais il y aura toujours des personnes pour te décoincer si tu as des soucis de code ou d'installation de ton serveur (ici ou sur le discord officiel MTA). -
VortDyn reacted to a post in a topic:
Is it possible? Variable in the variable name
-
Hello @VortDyn, I moved your topic to the Scripting section. The Tutorials section is only for Scripting Tutorials, for scripting questions, use the Scripting section instead. Make sure to use this section for your next scripting questions.
-
Are you sure you are showing the code where it actually happens ? Because there is no way you can reach the arithmetic operation (+1 or -1) unless ID = true, but table.find can't return true, it can only return false so if ID then should stop the code there. Can you show the exact command you type in chat, and the exact error message please ? (and which line the error occurs at)
-
- You use getElementData "Map" but where do you setElementData "Map" ? The element data doesn't exist when it is called and you get false instead of the map's name. - Don't escape strings yourself with gsub, use "?" placeholders instead. It will prevents bad things like SQL Injections for you. Example: local playerName = getPlayerName(source) executeSQLQuery("SELECT * FROM players WHERE name=?", playerName) - At line 144 I see you use getElementData "country" and "Country" are you sure about the names ? Why do you have 2 versions of the country data ? Looks like bad practice and looks confusing - [perf] Why do you need to trigger onServerSendRanking AND onServerSendRanking2 ?? They are the exact same calls, just use onServerSendRanking on both client handlers triggerClientEvent(source,"onServerSendRanking",source,ranking) triggerClientEvent(source,"onServerSendRanking2",source,ranking) - [perf] Don't use getElementData for the same data twice where you can call it once: if getElementData(v,"state") and getElementData(v,"state") == "alive" then Do this instead: local state = getElementData(v, "state") if state and state == "alive" then - [bug] Should be `< 10` here on both lines because you want that "8" or "9" turns into "08" or "09" respectively - Don't use reserved keywords for your variable names. Here table is a reserved keyword:
-
I think you removed a lot of the actual code but your loop should work if you fix the typo here (everything you did is case sensitive already): for _, p in pairs(getElementsByType("player")) do -- "player" not "Player" If that's not the issue in your code, then there has to be an error in the logs ? (playerLogged is the server event called from the login GUI form right ?)
-
Then this should work : triggerServerEvent("kilLDayZPlayer", hitElement, source) For onClientPlayerWeaponFire, source is the player element who fired the weapon, so adding it as the attacker attacker for the kilLDayZPlayer event should do the trick.
-
Where did you put that code ? can you show more of the script so we can see the context ? if you have the attacker available as a variable, you have to add it in your triggerServerEvent: triggerServerEvent("kilLDayZPlayer", hitElement, attacker) -- assuming attacker is the variable that holds the player element who attacked
