-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Nice one, keep up the good work .
-
You're welcome. I'll lock the topic to avoid unnecessary replies.
-
You should search on the forums, there are many topics related to this.
-
Cierro el tema asi nadie se confunde de nuevo.
-
Yakuza: Que yo recuerde este tema ya esta resuelto aca: viewtopic.php?f=91&t=41434
-
function Conteo ( ) if ( isElement ( image ) ) then destroyElement ( image ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/3.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"imagen/3.png",false) setTimer ( Conteo2, 1000, 1 ) outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. end
-
This should help you: https://community.multitheftauto.com/index.php?p= ... ls&id=3571
-
Mira los argumentos de outputChatBox.
-
Use this: addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( finalskin ) if (getPlayerMoney(source) >= 350) then outputChatBox ( type ( finalskin ) ..": ".. tostring ( finalskin ) ) setElementModel ( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) takePlayerMoney ( source, 350 ) end end ) and tell me what does it output.
-
Casi todo. function delayedChat () outputChatBox ( "1" ) setTimer ( delayedChat1, 1000, 1 ) end addCommandHandler("cuenta", delayedChat ) function delayedChat1 () outputChatBox ( "2" ) setTimer ( delayedChat2, 2000, 1 ) end function delayedChat2 () outputChatBox ( "3" ) setTimer ( delayedChat3, 3000, 1 ) end function delayedChat3 () outputChatBox ( "Go Go Go" ) end
-
addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( finalskin ) if (getPlayerMoney(source) >= 350) then setElementModel ( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) -- Your player argument is 'source', not 'localPlayer'. takePlayerMoney( source, 350 ) end end )
-
And what doesn't work? does it set your skin?
-
Should work, if you've selected a item from the gridlist.
-
As I said, copy the code again.
-
setWeaponProperty ( 26, "pro", "maximum_clip_ammo", 1000 ) -- You put the weapon ID as a string.
-
Try this: local skinmsglabel = "Welcome" .. Sgrid = guiCreateGridList(12,59,345,439,false,Window) ... Buttonbuyskin = guiCreateButton(12,503,122,29,"Buy skin (350$)",false,Window) Buttonclose = guiCreateButton(240,503,117,30,"Exit",false,Window) LabelTNS = guiCreateLabel(50,36,220,30,skinmsglabel ,false,Window) ... addEventHandler("onClientGUIClick", root, function () if (source == Buttonbuyskin) then local row,col = guiGridListGetSelectedItem(Sgrid) if (row and col and row ~= -1 and col ~= -1) then local finalskin = guiGridListGetItemText(Sgrid, row, 1 ) triggerServerEvent ( "buySkin", localPlayer, tonumber ( finalskin ) ) else if isTimer ( timer ) then killTimer ( timer ) end guiSetText ( LabelTNS, "Error: Please select a skin from the list." ) timer = setTimer ( guiSetText, 3000, 1, LabelTNS, skinmsglabel ) end end end )
-
In SQL you can search for more than one argument. Example: executeSQLQuery("SELECT * FROM vehicles WHERE owner = 'Castillo' AND id = '1'")
-
You can assign a unique ID to each vehicle you buy.
-
Change type="client" to type="server".
-
It must be something else, that is just fine.
-
Lil toady's admin panel has a function to get account ACL groups, you could take a look at it.
-
exports[ "scoreboard" ]:scoreboardAddColumn ( "Cash" ) exports[ "scoreboard" ]:scoreboardAddColumn ( "Points" ) function setStats ( player ) if ( not player or not isElement ( player ) ) then return end local account = getPlayerAccount ( player ) if ( account and not isGuestAccount ( account ) ) then local cash = getAccountData ( account, "cash" ) local points = getAccountData ( account, "points" ) setElementData ( player, "Cash", "$" .. cash or 0 ) setElementData ( player, "Points", points or 0 ) else setElementData ( player, "Cash", "guest" ) setElementData ( player, "Points", "guest" ) end end function timer() setTimer( setStats, 1000, 1, source ) end addEventHandler("onPlayerLogin", getRootElement(), timer) addEventHandler("onPlayerJoin", getRootElement(), timer) addEvent ( "onMapStarting", true ) addEventHandler ( "onMapStarting", root, function ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do setStats ( player ) end end )
