-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You could have found it by yourself by searching for "protec" at community.multitheftauto.com, but i'm a cool guy and did it for you https://community.multitheftauto.com/index.php?p= ... ls&id=1205
-
What do you mean? set a element data on a GUI element?
-
Do you mean, when a player joins show his Country name?
-
"Bad argument" means the given arguments are wrong.
-
this should work, ------------------- sound events --------------------------------- ------------------- when zombies die ----------------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function() if getTeamName(getPlayerTeam(source)) == "Zombies" then triggerClientEvent (source,"onzombiedie", source) end end) ------------------- when the survivor died ----------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function() if getTeamName(getPlayerTeam(source)) == "Survivors" then triggerClientEvent (source,"onsurvivorsdie", source) end end) ------------------ when zombie killed survivor -------------------- function zombiekilling () if getTeamName(getPlayerTeam(source)) == "Zombies" then triggerClientEvent (source,"onzombiekill", source) end end ----------------- when the survivor has killed the zombie ------------------------ function survivorskilling () if getTeamName(getPlayerTeam(source)) == "Survivors" then triggerClientEvent (source,"onSurvivorskill", source) end end i've done this little test to know what team you are in: addEventHandler( "onPlayerWasted", getRootElement( ), function() if getTeamName(getPlayerTeam(source)) == "Zombies" then outputChatBox("Team = Zombies") else outputChatBox("Team = ".. getTeamName(getPlayerTeam(source))) end end)
-
Sounds like 3 lines, but then you fix those and there comes another 3-5 lines.
-
This resource is f** outdated, i don't think you can get it working that easy.
-
Ah, ok, i'm argentinian, i don't know everything
-
Ah! then you got it wrong, you gotta use getTeamName of course, ------------------- sound events --------------------------------- ------------------- when zombies die ----------------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function() if getTeamName(getPlayerTeam(source))) ~= "Zombies" then return end triggerClientEvent (source,"onzombiedie", source) end end) ------------------- when the survivor died ----------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function() if getTeamName(getPlayerTeam(source)) ~= "Survivors" then return end triggerClientEvent (source,"onsurvivorsdie", source) end) ------------------ when zombie killed survivor -------------------- function zombiekilling () if getTeamName(getPlayerTeam(source)) ~= "Zombies" then return end triggerClientEvent (source,"onzombiekill", source) end ----------------- when the survivor has killed the zombie ------------------------ function survivorskilling () if getTeamName(getPlayerTeam(source)) ~= "Survivors" then return end triggerClientEvent (source,"onSurvivorskill", source) end
-
You want to play a Sound when you die acording to your Team name?
-
uhm, i've used math.floor on getElementHealth to return a simple number, not 54.987498498789 and so on.
-
outputChatBox( getPlayerName(thePlayer).. "#FF8040Do u speak english?!", root, 0, 0, 0, true ) "root" means will output to everyone, that's the "visible to" argument as Justus named it.
-
Normal moderators group is called "Moderator" not "Moderators"
-
------------------- sound events --------------------------------- ------------------- when zombies die ----------------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function() if getPlayerTeam(source) ~= "Zombies" then return end triggerClientEvent (source,"onzombiedie", source) end end) ------------------- when the survivor died ----------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function() if getPlayerTeam(source) ~= "Survivors" then return end triggerClientEvent (source,"onsurvivorsdie", source) end) ------------------ when zombie killed survivor -------------------- function zombiekilling () if getPlayerTeam(source) ~= "Zombies" then return end triggerClientEvent (source,"onzombiekill", source) end ----------------- when the survivor has killed the zombie ------------------------ function survivorskilling () if getPlayerTeam(source) ~= "Survivors" then return end triggerClientEvent (source,"onSurvivorskill", source) end try that, i'm not sure if i did it right (i just wake up)
-
Why would you execute a .bat or a .exe file? i see no point.
-
why do you use onPlayerConnect? this makes no sense for me o_o, put it onResourceStart (i think will be much better)
-
Puedes usar este programa online creado por un miembro del foro. http://mta.dzek.eu/vehicle/
-
Oh, well, then you must move it only.
-
I seen that, but no problem, i've added it myself for map spawnpoints
-
you could also use, math.floor.
-
I think RACE game mode doesn't has Time passed, right? you must script that if doesn't has it included.
-
I'm not sure of understand you, could you explain it better please?
-
function initiateSpawn() --after player login , this is called addEventHandler("onClientRender", getRootElement(), spawnTitle) --add the MOTD createTeleportWindow() -- add the teleport menu end addEvent("spawnReady", true) -- event that is called by the login addEventHandler("spawnReady", getRootElement(), initiateSpawn) function createTeleportWindow() -- create the spawn menu local selectMenu = guiCreateWindow(0, 0.75, 1, 0.25, "Select a City to start!", true) buttonLS = guiCreateButton(0.125, 0.25, 0.25, 0.5, "Los Santos", true, selectMenu) buttonSF = guiCreateButton(0.375, 0.25, 0.25, 0.5, "San Fierro", true, selectMenu) buttonLV = guiCreateButton(0.625, 0.25, 0.25, 0.5, "Las Venturas", true, selectMenu) addEventHandler("onClientGUIClick", root, handleSpawn) showCursor(true) end function handleSpawn(button,state) --handler that is called by the spawn menu if button == "left" and state == "up" then if source == buttonLS then outputConsole("LS Selected.") --testing, but not even this happens. will add the real stuff later. elseif source == buttonSF then outputConsole("SF Selected.") elseif source == buttonLV then outputConsole("LV Selected.") end end end function spawnTitle() -- a MOTD using dxDraw (this works fine), based on wiki example local screenWidth, screenHeight = guiGetScreenSize() local MOTDText = [[ Welcome to SUPERSQUIRELL -- s:D -->! Latest news: -New Login system, MOTD and spawn menu are DONE! -The spawn buttons will be enabled soon, once more of the gamemode is done. -Expect fun gameplay features by the end of the week. **Please disconnect, as there is nothing else to do here at this point. Thank you all for your continued patience while we continue development. -John ([email protected]) ]] local playerName = getPlayerName ( getLocalPlayer() ) -- Get players name. local x,y = guiGetScreenSize() -- Get players resolution. dxDrawText( "Read the MOTD, or select a city to spawn in!", screenWidth/10, screenHeight/10, screenWidth, screenHeight, tocolor ( 0, 255, 255, 255 ), 1.5, "pricedown" ) dxDrawRectangle ( x/3, y/3, x/2, y/2, tocolor ( 0, 0, 0, 150 ) ) -- Create our black transparent MOTD background Rectangle. dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) -- Create Welcome title. dxDrawText ( "Welcome " .. playerName, x/3.48, y/3.58, x, y, tocolor ( 0, 0, 0, 255 ), 1, "bankgothic" ) -- Create Welcome title shadow. dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 255, 255 ), 2 ) -- Create underline shadow. dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) end Btw, wth is this? Welcome to SUPERSQUIRELL <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->!
-
Bamby, your post makes no sense, also it fails, current version is 1.0.4. We don't know when will the MTA 1.1 be released, you can check the progress at: http://bugs.mtasa.com/roadmap_page.php
