
Spice
Members-
Posts
51 -
Joined
-
Last visited
Everything posted by Spice
-
[13:17:08] WARNING: Logsaver\server.lua:114: Bad argument @ 'setPlayerTeam' [Exp ected team at argument 2, got string 'Staff']
-
[11:50:48] WARNING: LogSave\server.lua:84: Bad argument @ 'getTeamFromName' [Exp ected string at argument 1, got boolean]
-
NOTE : This is the part of script which not working setAccountData ( Acc, "Team", getPlayerTeam (source)) local Team = getAccountData (acc, "Team") setPlayerTeam (source, Team) The debugs says that i can't use string at the second argument of setPlayerTeam, how to fix that ?
-
I wanna it gets hidden if the the "if statment" in the server side was made so anyway ? nvm fixed it thanks guys
-
I wanna it gets hidden if the the "if statment" in the server side was made so anyway ?
-
/login and /register commands are default functions of admin resource. You can search for them there and remove it. can't find it , aslo how to use GUIsetVisible to hide the gui if the player was logged in ? addEvent ( "login", true ) addEventHandler ("login", root, function (thePlayer, acc, pw) local account = getAccount (acc, pw) if ( account ~= false ) then logIn ( thePlayer, acc, pw ) -- I want to hide the gui now where should i add GUISetVisible ? else outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 ) end end
-
1 more question, how to disable /login command
-
Why it's not working when i enter a valid account name and pw ? There isn't debugscript output tho Client addEventHandler ( "onClientGUIClick", root, function () if (source == logi) then acc = guiGetText (acctype) pw = guiGetText (pwtype) triggerServerEvent ("login", getRootElement(), getLocalPlayer(), acc, pw) end end ) panel = guiCreateWindow(357, 119, 319, 277, "Login Panel", false) guiWindowSetSizable(panel, false) acctype = guiCreateEdit(74, 74, 158, 34, "", false, panel) pwtype = guiCreateEdit(74, 143, 158, 34, "", false, panel) guiEditSetMasked ( pwtype, true ) lab1 = guiCreateLabel(9, 82, 55, 16, "Account :", false, panel) lab2 = guiCreateLabel(10, 151, 64, 16, "Password :", false, panel) logi = guiCreateButton(26, 211, 116, 39, "Login", false, panel) create = guiCreateButton(190, 211, 116, 39, "Create Account", false, panel) guiSetVisible (panel, false) function ShowWindow1 ( ) guiSetVisible ( panel,true ) showCursor ( true ) end addEvent( "onJoin", true ) addEventHandler( "onJoin", localPlayer, ShowWindow1 ) Server function ShowWindow1 ( ) triggerClientEvent ( source, "onJoin", source ) setCameraMatrix ( source, -1630.71509, 440.49222, 142.57805, -1540.49854, 600.08282, 69.90792 ) end addEventHandler("onPlayerJoin",root,ShowWindow1) addEvent ( "login", true ) addEventHandler ("login", root, function () local account = getAccount (acc, pw) if ( account ~= false ) then logIn ( source, acc, pw ) else outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 ) end end )
-
Hello, I am here to ask you about how to make a marker that got an arrow inside it tells you the way to the following marker ?
-
function clos ( ) guiSetVisible (Wind, false) showCursor ( false, false ) end function creat ( ) x, y, z = getElementPosition ( localPlayer ) types = guiComboBoxGetSelected ( Types ) size = guiGetText ( Size ) R = guiGetText ( ColorR ) G = guiGetText ( ColorG ) B = guiGetText ( ColorB ) alpha = guiGetText ( Alpha ) alpha = guiGetText ( Alpha ) mc = createMarker ( x, y, z, types, size, R, G, B, alpha ) if ( mc ) then outputChatBox ( "Marker created successfully" ) else outputChatBox ( "Error" ) end end function gui () Wind = guiCreateWindow(399, 210, 243, 248, "Create Marker", false) guiWindowSetSizable(Wind, false) Types = guiCreateComboBox(78, 32, 155, 98, "Corona", false, Wind) guiComboBoxAddItem(Types, "Arrow") guiComboBoxAddItem(Types, "Cylinder") guiComboBoxAddItem(Types, "Check Point") guiComboBoxAddItem(Types, "Corona") guiComboBoxAddItem(Types, "Ring") lab = guiCreateLabel(9, 36, 69, 18, "Marker Type", false, Wind) lab2 = guiCreateLabel(9, 84, 69, 18, "Marker Size", false, Wind) Size = guiCreateMemo(78, 74, 155, 31, "From 1 to 10", false, Wind) lab3 = guiCreateLabel(10, 130, 69, 18, "Marker Color", false, Wind) ColorR = guiCreateMemo(79, 120, 35, 31, "R", false, Wind) ColorG = guiCreateMemo(118, 120, 39, 31, "G", false, Wind) ColorB = guiCreateMemo(160, 120, 39, 31, "B", false, Wind) lab4 = guiCreateLabel(9, 173, 69, 18, "Marker Alpha", false, Wind) Alpha = guiCreateMemo(79, 170, 154, 31, "From 0 to 250", false, Wind) Create = guiCreateButton(10, 209, 94, 29, "Create", false, Wind) addEventHandler ( "onClientGUIClick", Create, creat, false ) Close = guiCreateButton(129, 209, 94, 29, "Close", false, Wind) addEventHandler ( "onClientGUIClick", Close, clos, false ) ------------------------------------------------------------------------------- showCursor ( true ) end addCommandHandler ( "cm", gui, false ) Hello i made this script it's a gui which creates a marker on the player location he has also to fill some options but it don't create marker when i fill the options
-
Any another way to warp player ?
-
The script addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) outputChatBox( "Race has been started" ); local veh = createVehicle ( 411, 2465.43115, -1657.06018, 13.29160, 0, 0, 90 ) warpPedIntoVehicle ( localPlayer, veh ) setElementFrozen ( veh, true ) end ); The car gets spawned but i don't get warped in it. debug message : http://i.imgur.com/wPxLfkQ.jpg
-
I 've added that if ( getTeamName(getPlayerTeam(localPlayer)) == "Admin" ) then Del = guiCreateButton(200, 253, 95, 18, "Del Advert", false, Window) guiSetProperty(Del, "NormalTextColour", "FFAAAAAA") end But debug says : Bad argument @ getTeamName [Exepected team at argument 1 , got boolean]
-
Thanks ! Can you tell me how to make GUI button appear only for Team or ACL group using CLIENT function ?
-
Working now but can you tell me what have you did ? @xXMADEXx
-
function OpenWin () if ( guiGetVisible ( Window ) == true ) then guiSetVisible (Window, false) guiSetVisible (Addwindow, false) toggleAllControls ( true ) toggleControl ( "chatbox", true ) showCursor ( false ) else guiSetVisible (Window, true) toggleAllControls ( false ) toggleControl ( "chatbox", true ) showCursor ( true ) end end function nook ( ) guiSetVisible (Addwindow, true) guiSetVisible (Window, false) toggleAllControls ( false ) end function okno ( ) guiSetVisible (Window, false) showCursor ( false ) toggleAllControls ( true ) end function ops ( ) guiSetVisible (Addwindow, false) showCursor ( false ) toggleAllControls ( true ) end function ham ( ) guiGridListSetItemText(ADVERTISING,guiGridListInsertRowAfter(ADVERTISING,guiGridListGetRowCount(ADVERTISING)),advert,guiGetText (Write),false,false) guiGridListSetItemText(ADVERTISING,guiGridListInsertRowAfter(ADVERTISING,guiGridListGetRowCount(ADVERTISING)),player,getPlayerName(localPlayer),false,false) guiSetVisible (Addwindow, false) guiSetVisible (Window, true) end Window = guiCreateWindow(271, 208, 489, 284, "Advertisment Window", false) guiWindowSetSizable(Window, false) guiSetAlpha(Window, 1.00) ADVERTISING = guiCreateGridList(16, 32, 456, 211, false, Window) player = guiGridListAddColumn(ADVERTISING, "Player", 0.5) advert = guiGridListAddColumn(ADVERTISING, "Advert", 0.5) Add = guiCreateButton(26, 253, 95, 18, "Add Advert", false, Window) guiSetProperty(Add, "NormalTextColour", "FFAAAAAA") addEventHandler ( "onClientGUIClick", Add, nook, false ) Close = guiCreateButton(367, 253, 95, 18, "Close", false, Window) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") addEventHandler ( "onClientGUIClick", Close, okno, false ) Addwindow = guiCreateWindow(302, 276, 410, 208, "Add Advertise", false) guiWindowSetSizable(Addwindow, false) Write = guiCreateMemo(10, 37, 390, 117, "", false, Addwindow) FAddB = guiCreateButton(10, 168, 150, 30, "Add Advert", false, Addwindow) guiSetProperty(FAddB, "NormalTextColour", "FFAAAAAA") addEventHandler ( "onClientGUIClick", FAddB, ham, false ) ABC = guiCreateButton(255, 170, 145, 28, "Close", false, Addwindow) guiSetProperty(ABC, "NormalTextColour", "FFAAAAAA") addEventHandler ( "onClientGUIClick", ABC, ops, false ) guiSetVisible ( Window, false ) guiSetVisible ( Addwindow, false ) bindKey("F10", "down", OpenWin) Why when i add row is becomes like that not on the same line/row .
-
That's right it's working now Thanks !
-
it kills me twice 1 time once i type the command and the other after 5 secs. ( when i get respawned )
-
Still the same but debug says attempt to call global "killPed"(a nil value) when i tried it as server script Debug says : Bad argument @ 'setTimer' [ expected function at argument 1, got boolean ]
-
Not working still once i type the command i get killed