-
Posts
325 -
Joined
-
Last visited
Everything posted by novo
-
Como aquí no se hacen los scripts para los demás, a continuación te dejo unas pistas -- Añadimos la columna en la scoreboard call(getResourceFromName("scoreboard"), "Grupo", "grupo") -- Obtenemos el username del usuario de la scoreboard accountname = getAccountName (getPlayerAccount(scoreboardPlayer)) -- Evento que puedes usar addEventHandler("onClientRender", root, function() end )
-
function quitar() showPlayerHudComponent ( "all", false ) showPlayerHudComponent ( "radar", true ) showPlayerHudComponent ( "crosshair", true ) end addEventHandler ( "onClientPlayerSpawn", localPlayer, quitar )
-
Like our mate, Uhm, told you, start using new MySQL functions. dbConnect()
-
function onClickBtnRegister(button,state) --При нажатии на кнопку Register and Cofirm if(button == "left" and state == "up") then if (source == btn_reg_tab_register) then username = guiGetText(edit_account_name) password = guiGetText(edit__reg_tab_password) passwordConfirm = guiGetText(edit__reg_tab_Repassword) triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password,passwordConfirm,getLocalPlayer()) end end end
-
function onClickBtnRegister(button,state) --При нажатии на кнопку Register and Cofirm if(button == "left" and state == "up") then if (source == btn_reg_tab_register) then username = guiGetText(edit_account_name) password = guiGetText(edit__reg_tab_password) passwordConfirm = guiGetText(edit__reg_tab_Repassword) triggerServerEvent(getLocalPlayer(), "onRequestRegister",getLocalPlayer(),username,password,passwordConfirm,getLocalPlayer()) end end end function registerPlayer(username,password,passwordConfirm,thePlayer) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then outputChatBox ("#FF0000* #00FF00You have sucessfuly registered! [username: #FFFFFF" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true ) outputChatBox("You travelled to 'Philatopia' from *BLANK*.", source) outputChatBox("Your left-over cash = $500.", source) givePlayerMoney ( thePlayer, 500 ) else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Error ocurred. Choose a different username/password.") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An account with this username already exists") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Passwords do not match") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please confirm your password") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a password") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a username you would like to register") end end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
-
Where's the function that triggers addEvent("onRequestRegister",true) ? ..
-
What's the full function? & events?
-
So; isn't inserting the vehicle to the table or? spawn = nil spawn = createVehicle ( element.model, element.posX, element.posY, element.posZ, element.rotX, element.rotY, element.rotZ ) table.insert(spawnPoints, spawn)
-
It's outputting '0'
-
I've solved it, my mistake. I had to add element.vehicle instead of element.model. Anyway, I've got spawnPlayer() problem now. I've this; but it doesn't output "FOR" outputChatBox("BEFOREFOR") for i=1,#spawnPoints do outputChatBox("FOR") spawnPlayer ( spawned, 0.0, 0.0, 5.0, 90.0, 0 ) warpPlayerIntoVehicle( spawned, spawnPoints[i]) fadeCamera (spawned, true) setCameraTarget (spawned, spawned) end
-
spawn = createVehicle ( element.model, element.posX, element.posY, element.posZ, element.rotX, element.rotY, element.rotZ ) Line 30
-
Huh, I'm getting Bad Argument @ createVehicle()
-
No, I'm having error on warpPlayerIntoVehicle() PD: Full for loop; spawnPoints = {} for i, element in ipairs ( elements ) do if(element.type == "object") then createObject( element.model, element.posX, element.posY, element.posZ, element.rotX, element.rotY, element.rotZ ) elseif ( element.type == "vehicle" ) then createVehicle ( element.model, element.posX, element.posY, element.posZ, element.rotX, element.rotY, element.rotZ ) elseif ( element.type == "spawnpoint" ) then spawn = nil spawn = createVehicle ( element.model, element.posX, element.posY, element.posZ, element.rotX, element.rotY, element.rotZ ) table.insert(spawnPoints, spawn) end end
-
Hello, I'm having troubles with adding a created vehicle to a table, here's my code; spawnPoints = {} spawn = nil spawn = createVehicle ( element.model, element.posX, element.posY, element.posZ, element.rotX, element.rotY, element.rotZ ) table.insert(spawnPoints, spawn) I'm using spawnPoints table for warping the player here; but it's not working, error at warpPlayerIntoVehicle. for i=1,#spawnPoints do spawnPlayer ( spawned, 0.0, 0.0, 5.0, 90.0, 0 ) spawnpoint = spawnPoints[i] warpPlayerIntoVehicle( spawned, spawnPoints[i]) end Thanks in advance.
-
function GM ( ) for i,r in ipairs(getElementsByType("player")) do local vehicle = getPedOccupiedVehicle ( r ) if ( vehicle ) then for _, v in ipairs ( getElementsByType"vehicle" ) do setElementCollidableWith ( v, vehicle, not isElementCollidableWith ( v, vehicle ) ) end end end end addCommandHandler ( "gm", GM )
-
I solved it, thank you
-
Hello. I want to make you can't fight with other players. I mean when you press mouse1 you can hurt other players so, I wanna disable it. Thanks
-
Hello all. How can I make the race start working with an event? I mean if you are having race only on your server, when you join it shows race directly. I wanna make something like an event which I can trigger and when I trigger that event, the race starts for the player who triggered it. My English isn't perfect but I hope you understood my idea.
-
It's working Solid ^ Thank you !
-
I only need to know how to make a bind for L that when you press L it shows you Language: and then you can type.. Only that
-
I just want to do that when you press L it shows you English: and then you can type, like T (added by MTA) The following code is outputing CANT BIND if not executeCommandHandler("bind l chatbox English", thePlayer, "") then outputChatBox("CANT BIND") end
-
Still not working. I want to use executeCommandHandler because with using bindKey when you press "L", it doesn't show "Language:". Any ideas?