
Fantanic
Members-
Posts
160 -
Joined
-
Last visited
Everything posted by Fantanic
-
Am i also able to lock it to 2 classes? I tried to use 2 times setElementData(vehicle, "HLS", "SWAT HQ") And then again setElementData(vehicle, "HLS", "SWAT Member") With 1 element it works only
-
job skin.name = the second spawn wich i want to lock actualy ^^
-
Oh thank you , By the way i got 1 more last question ; I would like to lock a class actualy Here is an example : I added a team 'Squads' , after that i added FBI and SWAT I would like to lock only FBI to a ACL and SWAT to a other ACL so FBI members cant spawn SWAT i tought this should work but it isnt working ; local classACL = aclGetGroup( skin.name ); local plrAccount = getPlayerAccount( client ); if ( classACL ) then if ( not isGuestAccount( plrAccount ) ) and ( not isObjectInACLGroup( "user." .. getAccountName( plrAccount ), classACL ) ) then outputChatBox( "You are not member of this team/gang. Choose different team!", client, 200, 50, 50 ); requestMenu( client ); return; elseif isGuestAccount( plrAccount ) then outputChatBox( "If you are member of \"" .. skin.name .. "\" then please log in before you proceed.", client, 200, 50, 50 ); requestMenu( client ); return; end end (this i on line 21 at main_s.lua if u need the whole file tell me then i post it here , skin.name is difined as : if spawned then setElementData( client, "Team", class.name ) setElementData( client, "Job", skin.name )
-
It contains the group name (its the group name)
-
Isnt it supposed to be the group?
-
Its has soomething to do with GetElementData from the element : bad argument @ 'setElementData" [expected element at argument 1, got nil] (line 9)
-
This script didnt worked I meant that i dont know how to 'combine' it like u just have to place a car and then u have to locate that car or? BTW i want only 1 vehicle locked to 'HLS' and not all the vehicles with other words u just locked 1 car wich is created not the whole ID
-
Exactly what i wanted Hhhm was confused a sec , so the functions are onVehicleStartEnter and GetElementData() and cancelEvent() Will try to make it tongiht oh with map editor dont rlly get a thing , dont we need to create the vehicle in the script and not via map editor?
-
Isnt the car locked already? or shouldnt it be?
-
solved , ok another question how to lock a car to this elementdata? local vehicle = createVehicle(506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) -- Create the vehicle setElementData(vehicle, "HLS", true, false) -- Give it element data in 'Chief' and make its value a boolean 'true' addEventHandler("onVehicleStartEnter", root, function(thePlayer, seat, jacked, door) local vehicleOwner = getElementData(source, "HLS") -- Get the vehicle's element data on 'Chief' local gangGroup = getElementData( client, "HLS", skin.name ) -- Get the entering player's element data on 'Chief' if (not vehicleOwner) then return end -- If the vehicle doesn't have such data, then cancel if (gangGroup ~= vehicleOwner) then -- If the entering player's data doesn't match the vehicle data, continue outputChatBox("This car is locked and belongs to the following class: Admins", thePlayer, 245, 20, 20, false) -- Display a warning cancelEvent() -- Prevent the player from entering the vehicle end end ) I tried this already but it doesnt work (i found this script in a other forum since i didnt know how to get it work ^)
-
Ohw right i forgot to do that , thank you for letting me know. And its working now. Thanks
-
Hello , I would like to make a new collum named 'Jobs' I tried to make it already but it isnt working for some reason Im getting bad argument @ 'setElementData" [expected element at argument 1, got nil] here is the script line : setElementData(thePlayer,"Job","Job Name")
-
So how to get it working for everyone? or is it imposible
-
Thanks , SQL is a little bit too hard for me since i dont rlly know how to use it exactly. Im using the vehicle functions now so its working currently Edit how can i add a second color to a vehicle?
-
Hello , I'm using this script for a while and now i want to safe the colors but i cant find anyway how to safe it. And i also want to safe the upgrades. (this script am i using https://community.multitheftauto.com/in ... ls&id=6194) EDIT i mean with colors adding 2 colors to the police car like its blue and yellow also a color of their lights Greetings
-
if spawn then if not class.team then class.team = createTeam( class.name, class.color.red, class.color.green, class.color.blue ); end local plrTeam = getPlayerTeam( client ); if ( ( plrTeam ) and ( plrTeam ~= class.team ) and ( countPlayersInTeam( plrTeam ) == 1 ) ) then destroyElement( plrTeam ); end spawned = spawnPlayer( client, skin.spawnLoc.x, skin.spawnLoc.y, skin.spawnLoc.z, skin.spawnLoc.rot, skin.modelId, 0, 0, class.team ); end if spawned then setElementData( client, "class", class.name ) setElementData( client, "skin", skin.name ) fadeCamera( client, true ); setCameraTarget( client, client ); setTimer( setCameraTarget, 200, 1, client, client ); triggerClientEvent( client, "spawn_SpawnedSuccessfully", client ); is it like this? sorry for late responds
-
So this has to be added setElementData(hitPlayer, "Class") ? And where exactlY?
-
I did? better explaination maybe ; Now if u spawn as 'Admin' then u are in the Team Admin. I would like to have it so if u spawn 'Admin' that u are in the CLASS Admin and not Team
-
Hello , Is there anyway if u spawn 'Admin' that u are in the class admin and not in the team admin?
-
Its mostly a problem with the firewall settings in USBWebHost. So i have to turn of firewall on USBWebserver or? And how i do it ? Greetings , Jonas
-
Hello , I got a little problem . The script is working for me but someone others cant download the mods and enable it. While i can enable the mod and see the mod. Greetings , Jonas
-
Hello , I've installed it and it doesnt seem to work for me , i cant open the gui , i even dont see a message of press 'm' to open..
-
Thanks , was planing this to make it by myself since i like to learn how to script but im still a beginner so i got a question , I dont rlly know how to work with function setElementData , could u give me some more info about it? i see 'playername' but doesnt it supposed to be 'playerteam' ? also dont rlly know how to work with 'setaccountdata' fucntion the pay money thingy is confusing me