-
Posts
3,267 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tete omar
-
https://www.youtube.com/watch?v=A5_Xs2I5GnY observe when he type words a list of words show up and he pick one is that an option or something ? is it auto completition ? please if you know give me the link
-
I've create a gui window so how can put it on marker hit when the player hit the marker this window show up ? function myfirstwindow() local siwdth,sheight=guiGetScreenSize local width, height = 400,400 local x = (swidth /2 ) - ( width/2) local y = (sheight/2) - (height /2) window1 = guiCreateWindow(x,y,width,height,"Go to the moon",false) guiWindowSetMoveable(window1,false) guiWindowSetSizeable(window1,false) window1button= guiCreatebutton(137,380,158,37,"suumbit",false,window1) window1label= guiCreateLabel(10,25,380,359,[[Welcome to the moon trip. the moon trip is wonderful trip full of mystery stuff and nice gravitation. if you like to trip pay 50.000$ nice trip.]], false , window1) guiLabelSetHorizontalAlign (window1label , "center",true) addEventHandler("onClientGUIClick",window1button,window1buttonresponse,false) function window1buttonresponse(button,state) if button =="left" and state =="up" then guiSetVisible(window1,false) showCursor(false,false) outputChatBox("Good buy") end end Marker position x= 1007.3994140625 y=-2302.7998046875 z=12.10000038147 And when the player press start take from the player 50.000$ then the gate open Gate position x=1002.599609375 y=-2310.19921875 z=14.89999961853 gate rotation x=0 y=0 z=295.99914550781
-
But i have a little problem .. color codes function checkmoney(thePlayer, command) local money = getPlayerMoney(thePlayer) if (money > 199999) then outputChatBox("Your money stat: You are rich |congratulations| : D ! " .. tonumber(money), thePlayer) else outputChatBox("Your money stat: You are poor |work hard| : ( ", thePlayer) end end addCommandHandler("checkmoney", checkmoney) It shows like that .# 00ff00 Your money stat: You're rich .. not green
-
"Tete" type="script" version="1.0.0"/> It works thanks !!!
-
Lol thx bro..
-
function checkMoney(thePlayer, command) local money = getPlayerMoney(thePlayer) if (money > 1000) then outputChatBox("You are rich: " .. tostring(money), thePlayer) else outputChatBox("Poor guy...", thePlayer) end end addCommandHandler("checkMoney", checkMoney) Doesn't run ..........
-
if getPlayerName == 'TAPL' then givePlayerMoney ( thePlayer, "99999" ) outputChatBox ( "Not real money haha (keep up don't dream for real money)" , source, 0, 159, 255 ) end " the server will be not for DM or Race-handling server and will be more than 300-400 player i feel it ... If you want help me for no money then help if you don't want help .. then don't help... i've got 1 programmer and if you don't want come with me then i don't need you btw where's " Basemode and hajwalah " Lol i miss them." end
-
if getPlayerMoney == "99999" then setPlayerName (getRootElement, Cheater) outputChatBox ( "Don't cheat or you get banned" , source, 0, 159, 255 ) end Why doesn't run ? i want when the player get 99999 set his name to cheater and outputchatbox etc...
-
The first one and thanks
-
Just like when object go up .. then blow things under the rocket with out bombs or blowable Barrels. Thank you.
-
Well i don't understand it correctly
-
I didn't ask you ..
-
Like jail player .. ( Jail player )
-
Kenix how can i make the Local chat color different than player color and the chat color is white 3 colors Local chat color and the player color and the chat color
-
local r,g,b = getTeamColor(getPlayerTeam(player)) outputChatBox(type(r).." "..type(g).." "..type(b)) Result : boolean nil nil But i got a little problem .. :\ Why when i type a code like # 00ff00 or different also doesn't run ?
-
Thanks !!! it's working " can i get your e-mail please ? "
-
But why the color codes doesn't work ?
-
chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(LocalChat)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat)
-
Why localchat like that ? And if i put a color like # 00ff00 say something nothing happens Any color script ? chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(LocalChat)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat)
-
Where could i put this here ? local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function joinHandler ( ) spawnPlayer (source, 1957, -2181, 14, 0, 0, 0) fadeCamera (source, true) setCameraTarget ( source, source ) end function greetPlayer ( ) aPersons = { 111, 116, 10, 94 } outputChatBox ( "Thanks for join" , source, 0, 159, 255 ) setElementModel(source, aPersons[math.random(#aPersons)]) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer )Player ) function onPlayerQuit() local playerAccount = getPlayerAccount(source) if (playerAccount) and not isGuestAccount(playerAccount) then local playerMoney = getPlayerMoney(source) local playerSkin = getElementModel(source) setAccountData(playerAccount, "money", playerMoney) setAccountData(playerAccount, "skin", playerSkin) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) function onPlayerLogin() local playerAccount = getPlayerAccount(source) if (playerAccount) and not isGuestAccount(playerAccount) then local playerMoney = tonumber(getAccountData(playerAccount, "money")) local playerSkin = tonumber(getAccountData(playerAccount, "skin")) if (playerMoney and playerSkin) then setPlayerMoney(source, playerMoney) setElementModel(source, playerSkin) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) setElementModel(player, tonumber(getElementData(player,"tempSkin"))) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setElementData(source,"tempSkin",getElementModel(source)) setTimer(spawn, 1800, 1, source) end ) And here Who is these 3 persons ? are they specific ?
-
I want to spawn player with random specific persons Just like Varsity jacket <~~ person Skater kid <~~ person Bball player <~~ person And let the console pick a one of them etc.. And spawn the player on this area 1957 , -2181 , 14 ------------------------------------------------------------------------------------------ Look at my own ------------------------------------------------------------------------------------------ local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function joinHandler ( ) spawnPlayer (source, 1957, -2181, 14, 180, 99, 22) fadeCamera (source, true) setCameraTarget ( source, source ) end addEventHandler ( "onPlayerJoin" , getRootElement ( ) , joinHandler ) function greetPlayer ( ) outputChatBox ( "Thanks for join" , source, 0, 159, 255 ) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer ) function onPlayerQuit() local playerAccount = getPlayerAccount(source) if (playerAccount) and not isGuestAccount(playerAccount) then local playerMoney = getPlayerMoney(source) local playerSkin = getElementModel(source) setAccountData(playerAccount, "money", playerMoney) setAccountData(playerAccount, "skin", playerSkin) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) function onPlayerLogin() local playerAccount = getPlayerAccount(source) if (playerAccount) and not isGuestAccount(playerAccount) then local playerMoney = tonumber(getAccountData(playerAccount, "money")) local playerSkin = tonumber(getAccountData(playerAccount, "skin")) if (playerMoney and playerSkin) then setPlayerMoney(source, playerMoney) setElementModel(source, playerSkin) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) setElementModel(player, tonumber(getElementData(player,"tempSkin"))) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setElementData(source,"tempSkin",getElementModel(source)) setTimer(spawn, 1800, 1, source) end ) But it don't work
-
Please give me the link of the final basemode
-
Thanks Oh i didn't find what i want