bandi94
Members-
Posts
1,037 -
Joined
-
Last visited
Everything posted by bandi94
-
I will create the object server side and i want to rotate it on client side
-
Hy i am back after 3 months i am back to do some new thing's to my server , but i forgot many thing's At this time my friend's are not online (here is late afternoon) so to don't script any nonfunctional stuff i wan't to ask something. I wan't to rotate an object after the Client Camera matrix whit "onClientCursorMove" now i know that some function's are sended to server and chnaged for all player's so if i create the object on server side , send the object to client and i rotate it on client side it will cange for all player's or only i will see it rotated ? Thx
-
HY i am back after 3 months in this months i don't code anything so i forget many think's Now i am back. So i want to make a FPS camera look : i tried whit setCameraMatrix whit onClientPreRender the only problem is that now i can't turn my Ped whit the mouse i can't rotate the camera whit the ped on the mouse . I wan't to make 2 camera's on is FPS and the secound something like FPS but when i rotate the camera then an object to rotate after the ped i will atach the ped to an object then the camera will be in front of the player then when i move the mouse left,right,up,down the the camera will rotate whit the object on the same time So any one can help me how to make that i can rotate the camera whit the ped on FPS camera i think's i still need to use matrix then somehow detect the mouse movment calculate the new pos and set the camera ? thx
-
i think that is a virus what pus your CPU to extrem (old it on 100% ) and the game can't run bk your CPU is overloaded how @GanJaRuleZ sayd reinstal the window's
-
use Account Data https://wiki.multitheftauto.com/wiki/Ser ... _functions
-
local invisible = { } local skins = { [ 217 ] = true, [ 310 ] = true } function toggleInvis ( ) setTimer ( function ( player ) local skin = getElementModel ( player ) if ( skins[ skin ] ) then if ( not invisible[ player ] ) then invisible[ player ] = true setPlayerNametagShowing ( player, false ) setElementAlpha ( player, 0 ) blip(player,true) else invisible[ player ] = false setPlayerNametagShowing ( player, true ) setElementAlpha ( player, 255 ) blip(player,false) end end end ,200, 1, source ) end addEventHandler ( "onPlayerSpawn", root, toggleInvis ) function blip(player,status) for i,v in pairs(getAttachedElements(player)) do if getElementType(v)=="blip" then r,g,b,a = getBlipColor(v) if status then setBlipColor(v,r,g,b,0) else setBlipColor(v,r,g,b,255) end end end
-
if you set the player's Alpha to 0 that will not hide the blip you need to destroy or set the blip alpha to 0 for i,v in pairs(getAttachedElements(source)) do if getElementType(v)=="blip" then r,g,b,a = getBlipColor(v) setBlipColor(v,r,g,b,0) end end
-
he just wanna help you bk to pay a scripter it's not cheap so it's better to learn scripting
-
this script will make 1 invisible 1 visible 1invisible 1 visible and so on .... player this is what you want ?
-
you can get the creator of the projectile on every projectile lunched check the creator and store it when somebody died bk of a rocket check the stored rocket's and done (whit the projectil store the player name ) https://wiki.multitheftauto.com/wiki/Element/Projectile
-
nope that is the script you need to save it as .lua make a meta.xml for it and you are done read this : https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
i never tryed that but i think that will be a bit laggy
-
client side addEventHandler("onClientResourceStart",resourceRoot, function() showPlayerHudComponent("radar" ,false) end)
-
save it on account data and on respawn check them and add it to the car
-
you can't pass the element itself bk that element it's created on client side
-
command : /kick id (ex. /kick 1) function kickPlayerHandler ( sourcePlayer,cmd,id ) local kicked= getPlayerFromID(id) if ( hasObjectPermissionTo ( sourcePlayer, "function.kickPlayer" ) ) then kickPlayer(kicked) end end addCommandHandler ( "kick", kickPlayerHandler ) function getPlayerFromID(who) for i,v in pairs">pairs(getElementsByType("player") )do if getElementData(v,"ID")==who then return v end end end
-
Try this (incearca asta iti stergea doar unu pentru ca nu leai pus in tabel ) @Forum modelator when this "in pairs" bug will be fixed ? rb={} function rbs(source,command,state) if getPlayerTeam(source) == getTeamFromName("Muncitorii Strazilor") or getPlayerTeam(source) == getTeamFromName("Las Venturas Police Department") then local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) if state == "1" then rb[#rb+1] = createObject(978,x,y,z-0.15,0,0,rotZ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*Blocaj adaugat.",source,255,255,0) elseif state == "2" then rb[#rb+1] = createObject(981,x,y,z,0,0,rotZ+180) setElementPosition ( source, x, y, z+1 ) outputChatBox("*Blocaj adaugat.",source,255,255,0) elseif state == "3" then rb[#rb+1] = createObject(3578,x,y,z-0.2,0,0,rotZ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*Blocaj adaugat.",source,255,255,0) elseif state == "4" then rb[#rb+1] = createObject(3091,x,y,z-0.38,0,0,rotZ+180) setElementPosition ( source, x, y, z+1 ) outputChatBox("*Blocaj adaugat.",source,255,255,0) elseif state == "5" then rb[#rb+1] = createObject(1238,x,y,z-0.65,0,0,rotZ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*Blocaj adaugat.",source,255,255,0) elseif state == "6" then rb[#rb+1] = createObject(1459,x,y,z-0.4,0,0,rotZ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*Blocaj adaugat.",source,255,255,0) else outputChatBox("SYNTAXA: /rb [1-6]",source,255,255,0) end end end addCommandHandler("rb",rbs) function del(source,command) for i,v in pairs">pairs(rb) do destroyElement(v) end end addCommandHandler("rbd",del)
-
where is the "blip" element added ? function removePin(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then for i,v in pairs">pairs(getAttachedElements(player)) do if getElementType(v)=="blip" then destroyElement(v) end end else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("unmark", true) addEventHandler("unmark", getRootElement(), removePin)
-
you mean to change the color ?
-
you need to add admin rights to the resource ResourceName={} --here put your resource names like ResourceName={"resource1","reasource2"} local tim=60000 -- time when to restart (1min) local amount= 1 -- how many time to restart ( 0 for infinit ) function restart() for i,v in pairs">pairs(ResourceName) do restartResource( getResourceFromName(v)) outputChatBox("Resource: "..v.." was restarted" end end setTimer(restart,tim,amount) LUA bug ResourceName={} --here put your resource names like ResourceName={"resource1","reasource2"} local tim=60000 -- time when to restart (1min) local amount= 1 -- how many time to restart ( 0 for infinit ) function restart() for i,v in pairs(ResourceName) do restartResource( getResourceFromName(v)) outputChatBox("Resource: "..v.." was restarted" end end setTimer(restart,tim,amount)
-
that website only ask for your money some pictures about the script you buy ? some information what can the script do ....
-
I am makig a new version of my country detector that can find your city now i have made a simpel php and a server side i added into acl etc etc.. but my problem is always return nil include("sdk/mta_sdk.php"); $table = mta::getInput(); $text = $table[0]; if(isset($text)){ $cat = "Diego"; mta::doReturn($cat); } and a lua function result(sum) if sum==nil then outputChatBox("nil") else outputChatBox(sum) end end function addNumbers(number1) callRemote ( "http://dgt-mta.comoj.com/MTA/test.php", result, "text" ) end addNumbers ( 123 )
-
replace the getPlayerName in_comon.lua whit this and if you ask in race gamemode getPlayerName(player) then it return whitout hex colors if you ask getPlayerName(player,"hex") then it will return the name whit hex color's function removeColorCoding ( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end _getPlayerName = getPlayerName function getPlayerName ( player,hex ) if hex then return _getPlayerName ( player ) else return removeColorCoding ( _getPlayerName ( player ) ) end end
