-
Posts
269 -
Joined
-
Last visited
Everything posted by fairyoggy
-
--server function checkguest (playerSource) sourceAccount = getPlayerAccount ( playerSource ) if isGuestAccount ( sourceAccount ) then CancelEvent() end end addEvent("checkguest",true) addEventHandler("checkguest",root,checkguest) --client function menuactivate () triggerServerEvent( "checkguest", getLocalPlayer()) DGS:dgsSetVisible(menuokno,true) end end addCommandHandler("menu",menuactivate) If you enter a command /menu then window appear. So... How to make a check on a guest? I mean the function will not work if player is guest.
-
This should work on the server side. So How do i make a text(from dgsGetText in client side) send to server side in outputChatBox?
-
--client addEventHandler("onDgsMouseClick", root, function() if source == askbt1 then local askEdit = DGS:dgsGetText(askEdit) playSoundFrontEnd(1) triggerServerEvent( "askPlayer", getLocalPlayer(), askEdit) end end) --server function askPlayer (ThePlayer, cmd, askEdit) outputChatBox ( "#DC143C[SYS] #ffffff["..hours..":"..minutes..":"..second.."] #FFA500ASK: #FFFFFF", source, 255, 100, 200,true ) end addEvent("askPlayer",true) addEventHandler("askPlayer",root,askPlayer) how to get a chat message from "dgsGetText(askEdit)" ?
-
@K1parik а как сделать setVisible(false) для dxDrawText?
-
--server function playerDamage_text ( attacker, weapon, bodypart, loss, dmg ) --when a player is damaged if bodypart then local message message = ("- "..loss.." hp") outputChatBox(message, root) end end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) --client local dmg = dxDrawText("- "..hp.." hp", x + 10 - w / 4, y - 15 - h - 12, w, h, tocolor(255, 0, 0), 1, "default-bold","left","top",false,false,false,true) При дамаге игрока в чат пишет урон, а как перенести этот текст в dxDrawText ?
-
--server function playerDamage_text ( attacker, weapon, bodypart, loss, dmg ) --when a player is damaged if bodypart then local message message = ("- "..loss.." hp") outputChatBox(message, root) end end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) --client local dmg = dxDrawText("- "..hp.." hp", x + 10 - w / 4, y - 15 - h - 12, w, h, tocolor(255, 0, 0), 1, "default-bold","left","top",false,false,false,true) chat writes damage. How to make the damage written in dxDrawText ?
-
bindKey("enter", "down", function() playSoundFrontEnd(1) end) I have a window with 1 edit. When player press "enter" then sound is played - everything works as it should BUT when player click on edit and try to press enter the sound is not played. How to fix it?
-
Решено.
-
У меня есть такие функции на серверной части. Первая срабатывает после того как игрок написал что то в чат, как мне сделать что бы вторая стартовала через 3 секунды? function playerChatting() setPedAnimation(source, "ped", "IDLE_chat") end addEvent("playerChatting", true ) addEventHandler("playerChatting", getRootElement(), playerChatting) function playerNotChatting() setPedAnimation(source) end addEvent("playerNotChatting",true) addEventHandler("playerNotChatting",root,playerNotChatting)
-
How to use the timer for the server part? function playerChatting() setPedAnimation(source, "ped", "IDLE_chat") end addEvent("playerChatting", true ) addEventHandler("playerChatting", getRootElement(), playerChatting) function playerNotChatting() setPedAnimation(source) end addEvent("playerNotChatting",true) addEventHandler("playerNotChatting",root,playerNotChatting) I can announce playerChatting() playerNotChatting() How to make "playerNotChatting" start after 3 second ?
-
just type instead "2" m9cko and that is all? What about triggerServerEvent How to use it correctly? in this situation --client addEventHandler("onDgsMouseClick", root, function() if source == test2button then local m9cko = DGS:dgsGetText(newEdit) DGS:dgsSetEnabled(test2button,false) playSoundFrontEnd(1) rr2() triggerServerEvent( "savem9cko", getLocalPlayer()) DGS:dgsSetText(agelabel,m9cko) end end ) Display text from Edit in label - complete but how now to add it to the base instead "2"
-
--client newEdit = DGS:dgsCreateEdit( 310, 305, 100, 18, "1", false,testernokno ) local m9cko = DGS:dgsGetText(newEdit) --server function savem9cko(m9cko) dbExec( dbSecurityConnection, ' UPDATE `Test` SET `m9cko`=? ', 2 ) outputChatBox( 'saved', source, 255, 0, 0, true ) end addEvent("savem9cko",true) addEventHandler("savem9cko",root,savem9cko) Something like that. And now how to announce "m9cko" (getText) instead "2" in dbExec
-
Can you please complete an example of this procedure. I tried to do it myself, but I can't
-
I mean that in the samp there are more objects and GTA 3 is not replaced by a new one.
-
And without replacing files in GTA 3, you can not do this? Example: like texture studio 2.0 for samp with retexture function
-
without changing gta 3 will not work?
-
I have a base. Table with 1 column function save() dbExec( dbSecurityConnection, ' UPDATE `Test` SET `column`=? ', 2 ) outputChatBox( 'Saved', source, 255, 0, 0, true ) end So I update the column to the value "2" How do i do: so that the value is taken from edit1 ? I mean. When i type in edit 1. Example "3" then "3" update value in this column.
-
Is it possible to create a new object? Do not change an existing one. create a new or copy the existing one and replace it with a new one.
-
In this topic, I would like to understand how I can create an id generation in this way. I understand that this is about creating a new custom id.
-
And should not be reset. All right. It is necessary to make generation like that: 0001, 0002, 0003 and so on until 9999 These numbers will get the prefix "A" A 0001 A 0002 New numbers after 9999 will be 0001 0002 0003 and so on until 9999 but with new prefix "B" B 0001 B 0002 Something like that I would like to do
-
It will be used in db. I need to understand how to generate id this way(in the first post)
