-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I don't understand your question.
-
You should only connect when the resource starts, not every time you want to retrieve data. Try this: addEventHandler ( "onResourceStart", resourceRoot, function ( ) connect = dbConnect ( "mysql", "dbname=localhost;host=localhost", "admin", "admin", "share=1" ) end ) function loadPlayerData ( thePlayer, datatype ) if ( connect ) and ( thePlayer) and ( datatype ) then local guest = getElementData ( thePlayer, "loggedin" ) if ( not guest == false ) then local account = getElementData ( thePlayer, "account" ) local findQuery = dbQuery ( connect, "SELECT `".. datatype .."` FROM smf_sdmembers WHERE passwd = '".. account .."'" ) if ( findQuery ) then outputChatBox ( "".. tostring ( findQuery ).."" ) local result, numrows, errmsg = dbPoll ( findQuery, - 1 ) if ( numrows > 0 ) then outputChatBox ( "".. result [ 1 ] [ datatype ].."") return result [ 1 ] [ datatype ] else return 0 end else outputDebugString ( "Failed to get ".. datatype .." for player ".. getPlayerName ( thePlayer ) .." @ findQuery" ) end else outputDebugString ( "Player not logged ".. getPlayerName ( thePlayer ) .."." ) end else outputDebugString ( "Bad arguments loadPlayerData." ) end end
-
You could try searching for another program to import it back.
-
La verdad que ni idea, nunca use ese game mode para mi, ademas esta compilado.
-
Si, pero para eso necesitas tener experiencia en Scripting del MTA. Necesitas crear un radar area con: createRadarArea y darle el element data "zombieProof" con setElementData.
-
Movido a la seccion "Scripting".
-
function pQuit ( ) if ( isElement ( carros [ source ] ) ) then destroyElement ( carros [ source ] ) end end addEventHandler ( "onPlayerQuit", root, pQuit )
-
You must create the colshape on a part of the Area 69 and start setting the radius from there.
-
This: addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLCreateTable ( "HouseData", "Name STRING, Preis INT, Int INT, PosX FLOAT, PosY FLOAT, PosZ FLOAT, IntX, IntY, IntZ" ) for index, row in ipairs ( executeSQLQuery ( "SELECT * FROM HouseData" ) ) do createPickup ( tonumber ( row [ "PosX" ] ), tonumber ( row [ "PosY" ] ), tonumber ( row [ "PosZ" ] ), 3, 1272, 2000 ) end end )
-
That just makes totally no sense, no offense. addEventHandler ( "onClientMarkerHit", carrosMarker, function ( hitPlayer ) if ( hitPlayer == localPlayer and not isPedInVehicle ( localPlayer ) ) then guiSetVisible ( carrosWindow, true ) showCursor ( true ) end end )
-
Como que un map random? no te entiendo. Ni aclaras que game mode estas usando.
-
addCommandHandler ( "money", -- Attach the command handler to our function. function ( thePlayer ) local account = getPlayerAccount ( thePlayer ) -- Get the player account. if ( not isGuestAccount ( account ) ) then -- If the account isn't guest. local balance = tonumber ( getAccountData ( account, "bank.balance" ) ) or 0 -- Get the account bank balance. outputChatBox ( "Your bank balance is $".. balance, thePlayer, 0, 255, 0 ) -- Output the balance to the player. end -- End the guest account check. end -- End the function. ) Read the comments.
-
playerBlipWindow = guiCreateWindow(384,150,199,294,"Player blip panel",false) guiWindowSetSizable(playerBlipWindow,false) gridListOfPlayers = guiCreateGridList(9,23,181,201,false,playerBlipWindow) guiGridListAddColumn(gridListOfPlayers,"Players",0.2) blipUnblipBut = guiCreateButton(9,232,85,52,"Blip/ \n Unblip",false,playerBlipWindow) closeBut = guiCreateButton(97,233,85,52,"Close",false,playerBlipWindow) function loadPlayers ( ) guiGridListClear ( gridListOfPlayers ) -- Clear current items. for index, player in ipairs ( getElementsByType ( "player" ) ) do -- Loop the current players. guiGridListSetItemText ( gridListOfPlayers, guiGridListAddRow ( gridListOfPlayers ), 1, tostring ( getPlayerName ( player ) ), false, false ) -- Add a row and set the text to the player name. end end addEventHandler ( "onClientResourceStart", resourceRoot, loadPlayers ) addEventHandler ( "onClientPlayerJoin", root, loadPlayers ) addEventHandler ( "onClientPlayerQuit", root, loadPlayers ) addEventHandler ( "onClientPlayerChangeNick", root, loadPlayers ) As for blips you must use: createBlipAttachedTo destroyElement
-
Use a for loop with the query received.
-
You must make a table with the radar/colshapes, because you have a loop there, is replacing "ra" variable with new radar area created.
-
Yes, my local server is running a 1.3 nightly build.
-
That doesn't work here either, why don't you use the server side one instead?
-
The script works fine here, I can't exit the vehicle if it's locked.
-
Sorry, my bad, I didn't see the end
-
Para que queres usar el shader? Con las funciones de DirectX drawing podes hacer que yo sepa. dxDrawLine
-
You forgot to end the second function Yakuza.