maarten123
Members-
Posts
44 -
Joined
-
Last visited
Everything posted by maarten123
-
hahahah, yes sorry for my late post, thanks for help varez
-
oh sorry script: addEventHandler("onMapStarting", root, function(mapInfo, mapOptions, gameOptions) if #getElementsByType ( "checkpoint" ) == 0 then -- if 1 outputDebugString("entered if1") local hunterFound = false for i, pu in pairs ( getElementsByType ( "racepickup" ) ) do -- for1 outputDebugString("entered for1") if getElementData ( pu, "type" ) == "vehiclechange" and getElementData ( pu, "vehicle" ) == getVehicleModelFromName ( "Hunter" ) then -- if2 outputDebugString("entered if2") hunterFound = true end end if hunterFound then maptype = "DM" else maptype = "DD" end outputChatBox("*this is a "..tostring(maptype).." map",getRootElement(),0,255,0) end end ) you means like this? so this is the result: 0times : entered if2 1times : entered if 1 number of vehicleschanges times: entered for1
-
yes i know what debugscript is, i use it but there is not a error or waring the only point is that he said it's alway a DD (also in DM maps) script: addEventHandler("onMapStarting", root, function(mapInfo, mapOptions, gameOptions) if #getElementsByType ( "checkpoint" ) == 0 then -- checking DD/DM map local hunterFound = false for i, pu in pairs ( getElementsByType ( "racepickup" ) ) do if getElementData ( pu, "type" ) == "vehiclechange" and getElementData ( pu, "vehicle" ) == getVehicleModelFromName ( "Hunter" ) then hunterFound = true end end if hunterFound then maptype = "DM" else maptype = "DD" end outputChatBox("*this is a "..tostring(maptype).." map",getRootElement(),0,255,0) end end )
-
sorry also don't work Again the same issue
-
hi, now i have make a script to check the map on DD/DM now this script check if there is a vehicle that is a hunter addEventHandler("onMapStarting", root, function(mapInfo, mapOptions, gameOptions) if #getElementsByType ( "checkpoint" ) == 0 then -- checking DD/DM map for i, pu in pairs ( getElementsByType ( "racepickup" ) ) do if getElementData ( pu, "type" ) == "vehiclechange" and getElementData ( pu, "vehicle" ) == getVehicleModelFromName ( "Hunter" ) then maptype = "DM" else maptype = "DD" end end outputChatBox(getPlayerName(source).."*this is a"..tostring(maptype).." map",getRootElement(),0,255,0) end end ) But now he always saying This is a DD map Can anyone help me out? Greetings Maarten123 EDIT: line 2
-
thanks , but i have a error on saving wait a sec
-
ok, but how can i get then the rank in DD/DM?
-
Oh, yes your right sorry i'm not very smart with LUA function saveondie(ammo, attacker, weapon, bodypart) outputChatBox(getPlayerName(source).." Rank: "..tostring(rank),getRootElement(),0,255,0) -- If you're lost then there will be shown what your rank (first, second, etc.) for the test, later i wanna save it on account data end addEventHandler("onPlayerWasted",getRootElement(),saveondie) i hope this is better oh yes what is nou de source?
-
i see in wiki that you can you rank if you use the event: onPlayerFinish, but there is not a finish in DD/DM
-
hi, i wanna make admin levels for my server. And i have read on Wiki that you can doe that with ACL So i have make a ACL and a group. <group name="admin-4b"> <acl name="admin-4b" /> <object name="resource.admin" /> <object name="user.[ETP]Vincentlol" /> </group> <acl name="admin-4b"> <right name="command.kick" access="true" /> <right name="function.kick" access="true" /> <right name="function.mute" access="true" /> <right name="command.mute" access="true" /> <right name="general.adminpanel" access="false" /> <right name="general.tab_players" access="false" /> <right name="general.tab_resources" access="false" /> <right name="general.tab_server" access="false" /> <right name="general.tab_bans" access="false" /> <right name="general.tab_adminchat" access="false" /> <right name="command.freeze" access="false" /> <right name="command.shout" access="false" /> <right name="command.spectate" access="false" /> <right name="command.slap" access="false" /> <right name="command.setgroup" access="false" /> <right name="command.sethealth" access="false" /> <right name="command.setarmour" access="false" /> <right name="command.setmoney" access="false" /> <right name="command.setskin" access="false" /> <right name="command.setteam" access="false" /> <right name="command.giveweapon" access="false" /> <right name="command.setstat" access="false" /> <right name="command.jetpack" access="false" /> <right name="command.warp" access="false" /> <right name="command.setdimension" access="false" /> <right name="command.setinterior" access="false" /> <right name="command.givevehicle" access="false" /> <right name="command.repair" access="false" /> <right name="command.blow" access="true" /> <right name="command.destroy" access="false" /> <right name="command.customize" access="false" /> <right name="command.setcolor" access="false" /> <right name="command.setpaintjob" access="false" /> <right name="command.listmessages" access="false" /> <right name="command.readmessage" access="false" /> <right name="command.listresources" access="false" /> <right name="command.start" access="false" /> <right name="command.stop" access="false" /> <right name="command.stopall" access="false" /> <right name="command.restart" access="true" /> <right name="command.execute" access="false" /> <right name="command.setpassword" access="false" /> <right name="command.setwelcome" access="false" /> <right name="command.setgame" access="false" /> <right name="command.setmap" access="false" /> <right name="command.setweather" access="false" /> <right name="command.blendweather" access="false" /> <right name="command.setblurlevel" access="false" /> <right name="command.setwaveheight" access="false" /> <right name="command.setskygradient" access="false" /> <right name="command.setgamespeed" access="false" /> <right name="command.setgravity" access="false" /> <right name="command.settime" access="false" /> <right name="command.ban" access="false" /> <right name="command.unban" access="false" /> <right name="command.banip" access="false" /> <right name="command.unbanip" access="false" /> <right name="command.banserial" access="false" /> <right name="command.unbanserial" access="false" /> <right name="command.listbans" access="false" /> <right name="function.blow" access="true" /> <right name="function.restart" access="true" /> </acl> so the problem is the fucunctions and commands that are allowed are not working also the adminpanle can't open can anyone help me out? greetings maarten123 sorry for my bad english i'm dutch
-
whahaahaha you like to suck metalhero, we don't steal it from you there are more clans with that clan tag also we have now a other clan tag now (~[ETP]~)
-
sorry guy, but i try anything this is now the only one that i not understand
-
hi, i have a question. i wanna make a stats script and i wanna get the rank if your die so i try this but isn't work Lua: function saveondie(rank,source) outputChatBox(getPlayerName(source).." Rank: "..tostring(rank),getRootElement(),0,255,0) end addEventHandler("onPlayerWasted",getRootElement(),saveondie) Error ERROR (filename).lua:2 : attempt to concatenate a boolean value greeting maarten123
-
Nice, thanks
-
ok thanks but this is the issue local playerpoints = getAccountData(playeraccount, "DD.Points") +1 i gonna add one point one if you win a DD or DM
-
Hi, i have a question about calculate with accountdata. i wanna make a stats script for MTA Race, so this script must be add a point. but, that isn't work Can anyone help me out? Greetings Maarten123 Sorry for my bad english, I'm dutch Script: local playeraccount = getPlayerAccount ( source ) local playerpoints = getAccountData ( playeraccount, "DD.Points" ) +1 setAccountData ( playeraccount, "DD.points", playerpoints )
-
Can anyone help me?
-
i see the problem if you winning there are no 2 alive humans/cars so now i need the dead players and then i get the rank of him
-
function check() local alive = getAlivePlayers() if (#alive == 1) then local player = alive[1] givePlayerMoney(player,1200) outputChatBox(getPlayerName(player).." is first!",getRootElement(),0,255,0) end if(#alive == 2) then local player2 = alive[2] outputChatBox(getPlayerName(player2).." is second!",getRootElement(),0,255,0) end end addEventHandler("onPlayerWasted",getRootElement(),check) this is a simpel version of that nut that is too bugged
-
function checkWinAndIfWinGiveWinCash (totalAmmo,killer,killerWeapon,bodypart,stealth) local rank = getAliveCount() if (rank == 1) then local allAlivePlayers = getAlivePlayers() local player = allAlivePlayers[1] local playerCount = getPlayerCount() local pointsToWin = playerCount *13 local cashToWin = playerCount *53 savePlayerData (player,"points",loadPlayerData(player,"points") + pointsToWin) savePlayerData (player,"cash",loadPlayerData(player,"cash") +cashToWin) outputChatBox (getPlayerName(player) .." #FF0000is first! He wins " .. tostring(pointsToWin) .." points and " .. tostring(cashToWin) .."$!",getRootElement(),255,0,0,true) end if(rank == 2) then local allAlivePlayers = getAlivePlayers() local player = allAlivePlayers[2] local playerCount = getPlayerCount() local pointsToWin = playerCount *13 local cashToWin = playerCount *53 outputChatBox (getPlayerName(player) .." #FF0000is 2nd!",getRootElement(),255,0,0,true) end end like this? but now is it bugged i wnat if all players dead then he say your 2dn or first
-
ok i have make a script but there is a bug look: function checkWinAndIfWinGiveWinCash (totalAmmo,killer,killerWeapon,bodypart,stealth) local rank = getAliveCount() if (rank == 1) then local allAlivePlayers = getAlivePlayers() local player = allAlivePlayers[1] local playerCount = getPlayerCount() local pointsToWin = playerCount *13 local cashToWin = playerCount *53 savePlayerData (player,"points",loadPlayerData(player,"points") + pointsToWin) savePlayerData (player,"cash",loadPlayerData(player,"cash") +cashToWin) outputChatBox (getPlayerName(player) .." #FF0000is first! He wins " .. tostring(pointsToWin) .." points and " .. tostring(cashToWin) .."$!",getRootElement(),255,0,0,true) end if(rank == 2) then outputChatBox (getPlayerName(player) .." #FF0000is 2nd!",getRootElement(),255,0,0,true) end end addEventHandler ("onPlayerWasted",getRootElement(),checkWinAndIfWinGiveWinCash) addEventHandler ("onPlayerQuit",getRootElement(),checkWinAndIfWinGiveWinCash) i don't see if i seccond the message, and elseif don't work Maarten123
-
yes, sorry but i dont now if that events will work for DD or DM
-
For example, the nitro or repair. I can also bit MTA LUA, but I may know not what event I should use. iik saw on the forum have a small script but I do not know if that works. function check() local alive = getAlivePlayers() if (#alive == 1) then local player = alive[1] givePlayerMoney(player,1200) outputChatBox(getPlayerName(player).." has earned $1200 for being the last player alive",getRootElement(),0,255,0) else outputChatBox("helaas",getRootElement(),0,255,0) end end addEventHandler("onPlayerWasted",getRootElement(),check)
-
Hi, I want a script for you if you win you get money. but now is my question how can I get the rank. I will that 1st guy get $100 money and teh 2nd $30 for instance can anyone help me ? greetings maarten123 sorry for my bad english i am dutch
-
Nice script man thanks a lot but I also want a manual to make sound mute Script: function soundautomute (thePlayer, command, playerName) playerName = getPlayerFromName(playerName) adminName = getPlayerName(player) if playerName then if (not automute[playerName]) then outputChatBox ("#ffaa00" .. playerName .. " has been sound mute by " .. adminName, getRootElement(), 255, 255, 255, true ) automute[playerName]=true else outputChatBox ("#ffaa00Player is already muted", thePlayer, 255, 255, 255, true ) end else outputChatBox ("Iets vergeten intevullen?", thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "soundautomute", soundautomute ) Error's [2010-06-27 19:20:38] WARNING: sounds/server.lua:96: Bad argument @ 'getPlayerFromName' [2010-06-27 19:20:38] WARNING: sounds/server.lua:97: Bad argument @ 'getPlayerName' [2010-06-27 19:20:47] WARNING: sounds/server.lua:97: Bad argument @ 'getPlayerName' [2010-06-27 19:20:47] ERROR: sounds/server.lua:100: attempt to concatenate global 'adminName' (a boolean value) i hope you can help me Greetings Maarten123 Sorry for my bad englush i'm dutch
