
bandi94
Members-
Posts
1,037 -
Joined
-
Last visited
Everything posted by bandi94
-
well you can use : setTimer getRealTime
-
and if is bigger ?? , you can but / you can't ? Normaly it should work 5000 is only 5s it's a small time , it should work with bigger values to .
-
function time() startTick = getTickCount() if not endTick then endTick = startTick + 1000*60*30 -- 1000 = 1s*60 = 1m*30 = 30 min end if startTick >= endTick then outputChatBox("30 mins") endTick = startTick + 1000*60*30 -- reset it again for 30 min end setTimer(time,50,0) -- or addEventHandler("onClientRender",root,time)
-
https://code.google.com/p/mtasa-blue/so ... Camera.cpp Hmmmm i need the .cpp for the downloading function (maps') let's hook them in memory
-
there must be a .lua file
-
in C/C++ false = 0 if you use it in "if" , in lua it's note . Anyway :" getAccountData(....) or 0 " is working
-
try with this .
-
Hola ,coma ebe aba bele ............ English please
-
--define local objects = {} --creating objects[#objects+1] = createObject...... --deleting them for i,object in pairs (objects) do destroyElement(object) objects[i]=nil end
-
Nope it's privat.
-
leeched from where ?? , you need to check the map's name . P.S that code is full of crap , i made same function in 30 line
-
I made an auto marker placer, i can't get to remove them :D
bandi94 replied to -ffs-AbodyRulez's topic in Scripting
show the code , most possbile you use the same variable. local marker = createMarker .... marker = createMarker.... destroyElement(marker) -- then ofc it's remove only the last -
"getPlayerFromName(person)" - is using direct comparation between all player's and the gived name. So when you type in the name , you need to type the color cod's to. If you name is #00ff00Me , and you type in Me , it will not find you bk you don't entered the color code.
-
My english is not perfect maybe this is the problem but i don't get your point , can you show a pic ? or explain better
-
onPlayerPickUpRacePickup individual players, how ???
bandi94 replied to -ffs-AbodyRulez's topic in Scripting
it's just an exampel for the simplest way , it should be changed to account data to save them on exit. -
for tyre wornness you could make , a function that return's the acceleration , from there you can tell if the vehicle is hard breaking / accelerating. Aswell checking for handreake / speed , and for last with "getVehicleTurnVelocity" you can check if is hard turning or slow nice turning. isVehicleOnGround Good luck.
-
in the shader file (.fx) is a variable (like a "local value"). That variable is used in the shader to make it dynamic (like the color for the nitro). So when you call "dxSetShaderValue" it will change the variable. (for the nitro you can pass the color, so when you set greend , the shander will be green, after that you set red =>> the shader will be red.) In your case is "gTexture" witch in the shader is the .png file you wanna add for the shader (vehiclelights)
-
addEventHandler ( "onClientRender", root, dxCreatePodium1s ) function dxCreatePodium1s () local x,y,z = getElementPosition(thirdCards) -- z = z + 2 local px,py,pz = x+5, y+10, z+2 local distance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if distance <= 150 then local sx,sy = getScreenFromWorldPosition ( x, y, z+0.55, 0.06 ) if not sx then return end local scale = 1/(0.3 * (distance / 150)) local scale = 1 / ( 0.3 * ( distance / 150 ) ) dxDrawText ( "Fabioxps", sx, sy - 70, sx, sy - 60, tocolor ( 255, 255, 255, 255 ), 2, "default-bold", "center", "bottom", false, false, false, true ) --end --end --end end end
-
onPlayerPickUpRacePickup individual players, how ???
bandi94 replied to -ffs-AbodyRulez's topic in Scripting
local hunters = {} function HunterCounts(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then hunters[getPlayerName(source)] = ( hunters[getPlayerName(source)] or 0 )+1 if hunters[getPlayerName(source)] == 1 then outputChatBox(getPlayerName(source).."#FFFFFFreached Hunter#FF0000 ".hunters[getPlayerName(source)].." #FFFFFFtime",_,255,255,255,true) elseif hunters > 1 then outputChatBox(getPlayerName(source).."#FFFFFFreached Hunter#FF0000 "..hunters[getPlayerName(source)].." #FFFFFFtimes",_,255,255,255,true) end end end addEventHandler("onPlayerPickUpRacePickup", root, HunterCounts) -- Script made by -ffs-AbodyRulez specially for ffs simulation servers -- -
you even don't checked wiki ......... https://wiki.multitheftauto.com/wiki/DxDrawText , after variable color there is a variable caled "SIZEEEEEEEEE" As you can see in your dxDraw size variable = math.min ( 0.4 * ( 20 / distance ) * 1.4 where is distance = the size is changeing when the distance is bigger. To keep text the same size is veryyyyyyyyy logical that in size variable you dont need "distance" =>> you need a constant int value like 2. P.S next time check wiki first and don't wait everything 100% done (who want a server , learn lua) addEventHandler ( "onClientRender", root, dxCreatePodium1s ) function dxCreatePodium1s () local x,y,z = getElementPosition(thirdCards) -- z = z + 2 local px,py,pz = x+5, y+10, z+2 local distance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if distance <= 150 then local sx,sy = getScreenFromWorldPosition ( x, y, z+0.55, 0.06 ) if not sx then return end local scale = 1/(0.3 * (distance / 150)) local scale = 1 / ( 0.3 * ( distance / 150 ) ) dxDrawText ( "Fabioxps", sx, sy - 70, sx, sy - 60, tocolor ( 255, 255, 255, 255 ), 2, 4 ), "default-bold", "center", "bottom", false, false, false, true ) --end --end --end end end
-
onPlayerPickUpRacePickup individual players, how ???
bandi94 replied to -ffs-AbodyRulez's topic in Scripting
bk it's server sided = all player willhave the same "hunters" variable. To make this you sould use table or accountData -
[DM] when a map finishes and another one starts event?
bandi94 replied to -ffs-AbodyRulez's topic in Scripting
"onClientMapStopping" or "onRaceStateChanging(state)" with "state == "NextMapVote or SomeoneWon" -
[DM] when a map finishes and another one starts event?
bandi94 replied to -ffs-AbodyRulez's topic in Scripting
https://wiki.multitheftauto.com/wiki/RU/Resource:Race onClientMapStarting --client side onMapStarting --server side -
getElementMatrix