-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
You need to get the account first then get the account data, if he has the data then open the gate for him? getPlayerAccount isGuestAccount -- You might need this. getAccountData
-
? ما أشوف أي كود بالموضوع كيف نساعدك؟ نقرأ الي بمخك مثلاً؟ !وش القيم مود اصلاً *ينقل إلى قسم البرمجة
-
function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end local xa, ya, za = getElementPosition(marker1) local xb, yb, zb = getElementPosition(marker2) function walking(walking) setElementRotation(johnny, findRotation(xa, ya, xb, ya)) setPedAnimation( johnny, "ped", "WOMAN_walknorm") end How difficult it is to understand this? Edit: Also setElementRotation required 3 arguments, while findRotation return one argument only.
-
https://wiki.multitheftauto.com/wiki/FindRotation findRotation (Function source) must be inside your script.
-
kickPlayer giveWeapon createVehicle warpPedIntoVehicle getElementHealth setElementHealth givePlayerMoney *ينقل لقسم البرمجة
-
Do you know that addCommandHandler client side does not have player parameter? Does your function isPlayerVIP available client side?
-
onClientPlayerWasted = عندما يموت لاعب https://wiki.multitheftauto.com/wiki/OnC ... ayerWasted
-
هههههههههههه تستهبل على مخي انت؟ تحط فيه أند و تقول خربان شوف سطر7
-
-- Server Side -- iLoveMyMother = true function MoveDoor() if iLoveMyMother then moveObject(door, 5000,-2596.6999511719, 1354.5999755859, 13.39999961853) else moveObject(door, 5000, -2596.5, 1354.6999511719, 7.5999999046326) end iLoveMyMother = not iLoveMyMother end addEventHandler("onResourceStart", resourceRoot, function() door = createObject(3084, -2596.5, 1354.6999511719, 7.5999999046326,0,0,82) for i, player in ipairs (getElementsByType("player")) do bindTheKeys(player) end end) addEventHandler("onPlayerJoin", root, function() bindTheKeys(source) end) function bindTheKeys(player) bindKey(player, "Tab", "down", MoveDoor) end
-
function gui(player) if vipGUI and exports.SCGvip:isPlayerVIP(player) then triggerClientEvent(player, "GUIsee", player) end end addCommandHandler("viphats", gui) function giveVIPJetpack(thePlayer) if giveVIPJetpack and exports.SCGvip:isPlayerVIP(thePlayer) then if not doesPedHaveJetPack(thePlayer) then givePedJetPack(thePlayer) outputChatBox("VIP: Jetpack enabled", thePlayer, 0, 250, 0) else removePedJetPack(thePlayer) outputChatBox("VIP: Jetpack removed", thePlayer, 250, 0, 0) end end end addCommandHandler("vipjetpack", giveVIPJetpack)
-
isElementWithinMarker cancelEvent Event: "onClientPlayerDamage"
-
Not tested, and not sure if it will work or not. function getPlayersCountInMarker(marker) if isElement(marker) and getElementType(marker) == "marker" then local col = getElementColShape(marker) if col then local count = getElementsWithinColShape(col, "player") if count and type(count) == "table" then return #count end end end end
-
givePlayerMoney client side doesn't require player element. outputChatBox client side doesn't require player element.
-
https://forum.multitheftauto.com/viewtopic.php?f=119&t=49609
-
-- Server Side (not tested) addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local team = getPlayerTeam(source) if team then setAccountData(account, "Team", getTeamName(team)) end end end) addEventHandler("onPlayerLogin", root, function(_, account) local team = getAccountData(account, "Team") if team then local team = getTeamFromName(team) if not team then local team = createTeam(getAccountData(account, "Team"), 0, 0, 255) end setPlayerTeam(source, team) end end)
-
سطر رقم 2 ذا سيرفر و باقي الكود كلينت
-
بما ان لا يوجد أفنت لما التيم يتغير في ذي الحاله بتحتاج إلى تايمر لا نهائي setTimer getElementsByType -- for loop all players getPlayerTeam getTeamFromName setElementModel
-
-- server side createTeam("Police", 0, 0, 255) بما انك تحط اللاعب في التيم عن طريق الأدمنية ليه ما تكمل الجميل و تحط له الشخصية من الأدمنية كمان
-
قصدك أن أنت تحط اللاعب في التيم عن طريق الأدمنية؟
