-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
setTimer ( setPlayerWantedLevel, 60000, 1, pla, 0 )
-
Instead of asking, WAIT.
-
Post your code on http://pastebin.com/
-
Estas copiando y pegando, no estas estudiando las funciones.
-
No te das cuenta que sigue sin tener sentido? 'theVehicle' no esta definido en ninguna parte. Te aconsejo que vuelvas a lo basico.
-
Eso funcionaria, si, pero sigue sin tener algo que lo ejecute.
-
window1 = guiCreateWindow(268,214,530,216,"Blazy's Admin Panel! Use /admin to close!",false) guiSetVisible ( window1, false ) button1 = guiCreateButton(10,27,164,82,"Flying cars ON",false,window1) guiSetFont(button1,"sa-header") button2 = guiCreateButton(356,118,159,86,"Admin Base",false,window1) guiSetFont(button2,"sa-header") button3 = guiCreateButton(184,118,164,82,"Hoover cars off",false,window1) guiSetFont(button3,"sa-header") button4 = guiCreateButton(12,117,164,82,"Flying cars off",false,window1) guiSetFont(button4,"sa-header") button5 = guiCreateButton(354,26,164,82,"Admin Godmode",false,window1) guiSetFont(button5,"sa-header") button6 = guiCreateButton(182,26,164,82,"Hoover Cars On",false,window1) guiSetFont(button6,"sa-header") addCommandHandler ( "admin", function ( ) guiSetVisible ( window1, not guiGetVisible ( window1 ) ) showCursor ( guiGetVisible ( window1 ) ) end ) function flyingcars ( ) setWorldSpecialPropertyEnabled ( "aircars", true ) end addEventHandler ( "onClientGUIClick", button1, flyingcars ) function flyingcar ( ) setWorldSpecialPropertyEnabled ( "aircars", false ) end addEventHandler ( "onClientGUIClick", button2, flyingcar )
-
Eso esta mejor, pero se que no lo hiciste vos. P.D: Te falto algo para ejecutar la funcion.
-
Por favor, podrias por lo menos leer el sintaxis de las funciones? setVehicleColor retorna un boolean: true o false.
-
Then, you don't need the other trigger. -- client side: addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == GridListePlayer ) then local col = guiGridListGetSelectedItem ( GridListePlayer ); if ( col and col ~= -1 ) then local playername = guiGridListGetItemText ( GridListePlayer, col, 1 ); triggerServerEvent ( 'triggerData', localPlayer, playername ); end end end ) addEvent ( 'setText', true ); addEventHandler ( 'setText', root, function ( player, ip, serial, account ) guiSetText ( LabelName, "Name : " .. tostring ( player ) .. " " ); guiSetText ( LabelIp, "IP : " ..tostring ( ip ) .." " ); guiSetText ( LabelSerial, "Serial : " ..tostring ( serial ) .." " ); guiSetText ( LabelAccountName, "Account Name : " ..tostring ( account ) .." " ); end ) -- server side: addEvent ( 'triggerData', true ); addEventHandler ( 'triggerData', root, function ( playerName ) local player = getPlayerFromName ( playerName ) if ( player ) then local playerip = getPlayerIP ( player ); local playerSerial = getPlayerSerial ( player ); local accountname = getAccountName ( getPlayerAccount ( player ) ); triggerClientEvent ( source, 'setText', source, playerName, playerip, playerSerial, accountname ); end end )
-
Usa la funcion: math.random Hace click en la funcion para obtener informacion sobre la misma.
-
I've fixed GanJaRuleZ's script, which has two commands: /team and /skin, when you use them, it'll get your skin, team name and output it to the chat box.
-
Ah, estas hablando de los colores R, G, B, esos los podes usar en setVehicleColor. Esto le pone el color rojo y verde a un vehiculo: setVehicleColor ( theVehicle, 255, 0, 0, 0, 255, 0 )
-
I've read your script many times and I still don't understand why do you need to trigger again to the server side? also, you aren't even using it these values.
-
function createGate ( ) gatePolice = createObject ( 10558, 1588.9000244141, -1638.4000244141, 14.5, 0.000000, 0.000000, 89.000000 ) team = getTeamFromName ( "Police" ) checkGateMarker = createMarker ( 1588.455078125, -1638.328125, 13.391061782837, "corona", 10, 0, 0, 255, 0 ) createBlipAttachedTo ( checkGateMarker, 37 ) addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) addEventHandler ( "onMarkerLeave", checkGateMarker, onLeave ) end addEventHandler ( "onResourceStart", resourceRoot, createGate ) function gateCheckingTeam ( thePlayer, matchingDimension ) local pteam = getPlayerTeam ( thePlayer ) if ( pteam == team ) then moveObject ( gatePolice, 3000, 1588.9000244141, -1638.4000244141, 18.5, 0.000000, 0.000000, 0.000000 ) else -- code end end function onLeave ( thePlayer, matchingDimension ) local pteam = getPlayerTeam ( thePlayer ) if ( pteam == team ) then setTimer ( movingBackPolice, 3000, 1, thePlayer ) else --code end end function movingBackPolice ( ) moveObject ( gatePolice, 3000, 1588.9000244141, -1638.4000244141, 14.5, 0.000000, 0.000000, 0.000000 ) end
-
He didn't put that, you are giving him wrong information. @sckatchof: You must add the resource to the "acl.xml", "Admin" group.
-
function teamGet ( thePlayer ) local team = getPlayerTeam ( thePlayer ) local teamName = team and getTeamName ( team ) or "None" outputChatBox ( teamName, thePlayer, 255, 0, 0, true ) end addCommandHandler ( "team", teamGet ) function skinGet ( thePlayer ) local skin = getElementModel ( thePlayer ) outputChatBox ( skin, thePlayer, 255, 0, 0, true ) end addCommandHandler ( "skin", skinGet ) Your errors: 1: 'source' is nil there, you forgot to define the player argument. 2: You forgot to get the name of the player team.
-
Vehicle mods: https://community.multitheftauto.com/index.php?p= ... ls&id=4163 https://community.multitheftauto.com/index.php?p= ... ls&id=4167
-
Que yo sepa estas hablando del Car Paint: https://wiki.multitheftauto.com/wiki/Sha ... #Car_paint
-
No, que yo sepa ninguna otra funcion hace esto.
-
Si yo no posteo es porque no se como ayudar, no soy como otros que postean al pedo. P.D: Esta funcion nunca me funciono bien ami.
-
function abrir ( ) local ID = 971 local x = 96.55167 local y = 1920.39172 local z = 18.14190 local puerta = createObject ( ID, x, y, z, 0, 0, 0 ) -- move the gate local x2 = 96.55167 local y2 = 1920.39172 local z2 = 21 moveObject ( puerta, 1500, x2, y2, z2 ) -- set a timer to close the gate in 5 seconds setTimer ( moveObject, 5000, 1, puerta, 1500, x, y, z ) end addCommandHandler ( "abrir51", abrir ) Your errors: 1: You had an extra parentheses. 2: You had an extra 'end'. 3: Your variables we're defined AFTER you use them.
-
No, because you've just copied and pasted it. I recommend you to think before post.