-
Posts
244 -
Joined
-
Last visited
Everything posted by Price.
-
I made a script so whenever I stand on the marker the gui shows up and when I press accept gets me to Criminal job then the job starts, everything is working except this weird error [2014-02-26 23:30:13] ERROR: Client (Price) triggered serverside event HaveCriminalJob, but event is not added serverside here's part of the client side addEventHandler("onClientGUIClick",jobwindow, function(b) if b == "left" then if source == takebutton then -- checks if I press on the accept or not if getTeamName(getPlayerTeam(lp)) ~= "Criminal" then -- checks if I'm in the carjacker team triggerServerEvent ( "HaveCriminalJob", lp) outputChatBox ("You are now now employed as a Criminal",255,255,0, true) -- outputs a message guiSetVisible(jobwindow,false) -- closes the gui showCursor(false) -- removes the cursor end elseif source == cancbutton then -- checks if I press on the cancel button guiSetVisible(jobwindow,false) -- and if I do, the gui will close. showCursor(false) -- removes the cursor end end end) Part of the server side function HaveCriminalJob() triggerClientEvent(source,"HaveCriminalJob",root,TheX,TheY) -- triggers the client event setPlayerTeam(source,getTeamFromName("Criminal")) -- sets me in "Carjacker" team addEvent ( "HaveCriminalJob", true) addEventHandler("HaveCriminalJob", root, HaveCriminalJob) end
-
thx bro really helped me!
-
hey but althought when i do /vgod a lot it doesnt tell me you dont have permission for this command if iam L2 or less can u help me ?
-
i've actually fixed it, i wanted it so Special groups could do it the Lvl 3 nd L4 only so i was tryin and gave it a try and this actually worked without any errors i made L3 and L4 groups and they worked but when i made L2 or less didn't exactly how i wanted it to be! ofc with ur code it helped alot thx function vehicleGodMod(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("L3"),("L4")) then setElementData(player, "Stafftag", 3) if getElementData(player,"Stafftag") >= 3 then if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then setVehicleDamageProof(getPedOccupiedVehicle(player),false) outputChatBox("Vehicle god mode disabled",player,255) else setVehicleDamageProof(getPedOccupiedVehicle(player),true) outputChatBox("Vehicle god mode enabled",player,0,255) end else outputChatBox("You dont have permission for this command!",player,255) end end end addCommandHandler("vgod",vehicleGodMod) addCommandHandler("vehiclegod",vehicleGodMod)
-
well inside Stafftag there is L0 L1 L2 L3 and L4 i want it to be used for L3 + only
-
uhm it works ,1st thing can i add it to 4 instead of 3? also uhm iam not in either lvl 3 or 4 or anything just Admin group and still can work with /vgod it works when iam admin i want only L3+ can do it
-
uhm i didnt add it yet, well can u gimme the function inside the script to test it?
-
if getElementData(player,"Stafftag") >= 4 then
-
function vehicleGodMod(player) if getElementData(player,"Stafftag") >= 4 then if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then setVehicleDamageProof(getPedOccupiedVehicle(player),false) outputChatBox("Vehicle god mode disabled",player,255) else setVehicleDamageProof(getPedOccupiedVehicle(player),true) outputChatBox("Vehicle god mode enabled",player,0,255) end else outputChatBox("You dont have permission for this command!",player,255) end end addCommandHandler("vgod",vehicleGodMod) addCommandHandler("vehiclegod",vehicleGodMod)
-
attempt to compare number with boolean @ citizen
-
same [05:55:43] ERROR: cargod\cargodmode.lua:2: attempt to compare number with boolean
-
function vehicleGodMod(player) if not getElementData (player,"Stafftag") >= 4 then outputChatBox("You dont have permission for this command!",player,255) return end if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then setVehicleDamageProof(getPedOccupiedVehicle(player),false) outputChatBox("Vehicle god mode disabled",player,255) else setVehicleDamageProof(getPedOccupiedVehicle(player),true) outputChatBox("Vehicle god mode enabled",player,0,255) end end addCommandHandler("vgod",vehicleGodMod) addCommandHandler("vehiclegod",vehicleGodMod) this is cargodmode script i want only L3 and above can use this command so when i added this and tested in my server gave me that error attempt to compare number with boolean, when i used it in my friend's server always tell me you dont have permission for this command! and iam L3 already, any help?
-
viewtopic.php?f=102&t=35004
-
setPedControlState attachElements
-
outputChatBox(No player has been found with the ID " .. id .." )
-
nonono it will be like this ("No player has been found with the ID " .. id .. ")
-
remove that "." and put true instead
-
uhm mind telling me what is that last "." ?
-
try adding line 157 "No player has been found with the ID " .. id .. "." to outputChatBox
-
just look at your script if your exported functions in client then export it in client if its in server side then export it in server side
-
well export it then, function="exported function name" type="server or client"/>
-
well here is a better choice create a speaker anywhere and it will play the song. Client function onResourceStart() local sound = playSound3D("song.mp3",X,Y,Z, true) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) Server createObject ( 2232, 2495.1, -1689.9, 17.2, 0, 2, 182 ) create same file of the music .mp3 or whatever
-
then use event onClientMarkerHit and use setElementModel just an advice unlikely no one is going to give you the full code ready, just go to wiki and search for those argument's examples and learn by yourself to make this works.
-
no remove "Local" before function also try adding outputChatBox might get this fixed or tells you the errors