-
Posts
1,491 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Walid
-
this how you can fix it -- Server side local Table = { "word1", "word2" } function showits(player) if isElement(player) then triggerClientEvent(player,"showit",player,getWordsTable()) end end addCommandHandler("showit",showits) addCommandHandler ( "addword", function ( player, cmd, word ) if word then table.insert ( Table, tostring ( word ) ) end end ) function randomizer() word = Table[math.random(#Table)] outputChatBox("Random word "..word.."") end addCommandHandler("words",randomizer) addCommandHandler ( "removeword", function ( player, cmd, word ) if word then for k, v in pairs ( Table ) do if v == word then table.remove ( Table, k ) break end end end end ) function getWordsTable() return Table end -- Client side addEventHandler("onClientResourceStart",resourceRoot, function() window1 = guiCreateWindow(471, 219, 200, 210, "Words in randomizer", false) guiWindowSetSizable(window1, false) guiSetVisible(window1,false) gridlist1 = guiCreateGridList(16, 50, 167, 146, false, window1) collumn1 = guiGridListAddColumn(gridlist1, "Words", 0.9) end ) function addWordToGridList(Table) guiSetVisible(window1,true) for i, v in pairs (Table) do local row = guiGridListAddRow(gridlist1) guiGridListSetItemText (gridlist1, row, collumn1,tostring(v[1]),false, false) end end addEvent("showit",true) addEventHandler("showit",root,addWordToGridList)
-
lol are you serious you want to use "guiGridListSetItemText" server side your code is wrong.
-
هكذا local team = getPlayerTeam(element) if team then if getTeamName(team == " الإسم") then -- your code here end end
-
Example addEventHandler("onClientResourceStart",resourceRoot, function() window1 = guiCreateWindow(471, 219, 200, 210, "Words in randomizer", false) guiWindowSetSizable(window1, false) guiSetVisible(window1,false) gridlist1 = guiCreateGridList(16, 50, 167, 146, false, window1) collumn1 = guiGridListAddColumn(gridlist1, "Words", 0.9) end ) function addWordToGridList() for i, v in pairs (Table) do local row = guiGridListAddRow(gridlist1) guiGridListSetItemText (gridlist1, row, collumn1,tostring(v[1]),false, false) end end
-
you need to use something like that for i, v in pairs (Table) do -- you code here end
-
أنا ما فهت عليك أنت تحب يكون فيه 2 group try to use or local marker1 = createMarker (-2416.55371,-603.77325,131.56250, "cylinder", 2, 244 , 87, 10, 255 ) addEventHandler ( "onMarkerHit", marker1, function (element,matchingDimension) if (matchingDimension and isElement(element) and getElementType ( element ) == "player") then local group = getElementData( element ,'Group') if (group == "max") or (group == "الثاني") then setElementHealth ( element, 100 ) setPedArmor ( element, 100 ) setElementModel ( element, 230 ) else outputChatBox ( "(max)يجب ان تكون بي عصابة",element, 244 , 87, 10, true ) end end end )
-
really i don't undrestad nothing anyways to destroy somthing you need to use destroyElement if isElement(--[[ element here]]) then destroyElement(--[[ element here]]) end
-
bindKey (source,"u","down", "chatbox","local")
-
simply all what you need to do is reinstall your MTA:SA then use CCleaner. it should work
-
Read this : ExecuteSQLQuery
-
it must be "onClientResourceStart" because you are trying to use (client;server) in the same code. here client side event and here server side event
-
You need to add the element here
-
onClientPlayerWasted there is no ammo argument. function rewardOnWasted (killer, weapon, bodypart ) if (killer and isElement(killer) and getElementType(killer) == "player" and killer ~= source ) then if bodypart == 9 then triggerServerEvent("addUserEXP", resourceRoot, killer, 10) else triggerServerEvent("addUserEXP", resourceRoot, killer, 5) end end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), rewardOnWasted )
-
according to this and this z is always 0 it mean 0+0.3 = 0.3
-
the code is already server side and you are trying to use TriggerServerEvent. ??? Try to use "onClientPlayerWasted"
-
lol as i can see it's enabled true.
-
post your code here
-
simply it can be like this function toggleGodMode(_,cur) local accountName = getAccountName(cur) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(source,"invincible") then setElementData(source,"invincible",false) outputChatBox("GOD if off",source,0,255,0) else setElementData(source,"invincible",true) outputChatBox("GOD is on",source,0,255,0) end end end addEventHandler("onPlayerLogin",getRootElement(),toggleGodMode)
-
can you explane your problem better
-
try this untested -- Sever side function returnMail(result, player) if result == true then outputChatBox("You mail has been successfully sended !", player, 255, 255, 255, true) else outputChatBox("Sorry, there is a problem in your website", player, 255, 255, 255, true) end end addEvent("sendEMail", true) addEventHandler("sendEMail", getRootElement(), function(player, target, subject, msg) callRemote ( --[[ you website here ]], returnMail, player, target, subject, msg ) end) -- Php <?php include( "mta_sdk.php" ); $input = mta::getInput(); $player = $input[0]; $target = $input[1]; $subject = $input[2]; $message = $input[3]; $mail = $target; if (!preg_match("#^[a-z0-9._-]+@(hotmail|live|msn).[a-z]{2,4}$#", $mail)) { $passage_ligne = "\r\n"; } else { $passage_ligne = "\n"; } $message_txt = " "; $message_html = "Test".$message.""; $boundary = "-----=".md5(rand()); $sujet = "MTA - ".$subject.""; $header = "From: \"MTA\"<[email protected]>".$passage_ligne; $header.= "Reply-to: \"MTA\" <[email protected]>".$passage_ligne; $header.= "MIME-Version: 1.0".$passage_ligne; $header.= "Content-Type: multipart/alternative;".$passage_ligne." boundary=\"$boundary\"".$passage_ligne; $message = $passage_ligne."--".$boundary.$passage_ligne; $message.= $passage_ligne."--".$boundary.$passage_ligne; $message.= "Content-Type: text/html; charset=\"ISO-8859-1\"".$passage_ligne; $message.= "Content-Transfer-Encoding: 8bit".$passage_ligne; $message.= $passage_ligne.$message_html.$passage_ligne; $message.= $passage_ligne."--".$boundary."--".$passage_ligne; $message.= $passage_ligne."--".$boundary."--".$passage_ligne; mail($mail,$sujet,$message,$header); $theresult = true; mta::doReturn($theresult, $player); ?>
-
You need to add the php file into your website.