Anubhav Posted August 15, 2014 Posted August 15, 2014 I have a script, which creates spawners. I've 2 same scripts only server.lua is diffrent. If I hit the marker it shows the GUI of firstOne. Why is that? Is it linked with it somehow/
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 Why? So it gets leaked? I am not putting any scripts. I am not even using exports. Can't someone explain?
#DRAGON!FIRE Posted August 15, 2014 Posted August 15, 2014 Why? So it gets leaked? I am not putting any scripts. I am not even using exports. Can't someone explain? u must Check if u put name of marker in event Or you specified it in event source put onMarkerHit Event .
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 I used resourceRoot at second arguement.
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 Check if the source == marker, lol. Lol? I make my markers like this I change the value of Marker variable -.-. local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...)
#DRAGON!FIRE Posted August 15, 2014 Posted August 15, 2014 Check if the source == marker, lol. Lol? I make my markers like this I change the value of Marker variable -.-. local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...) and why u don't use table ? with loop .
Et-win Posted August 15, 2014 Posted August 15, 2014 Check if the source == marker, lol. Lol? I make my markers like this I change the value of Marker variable -.-. local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...) How could I smell that? I didn't see any script lol.
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 Guyz, I just need help. I don't need advices atm. There's a diffrent problem. Why does the resource1 GUI comes with resource2 ??? Any helps!
Markeloff Posted August 15, 2014 Posted August 15, 2014 Maybe because you are using the same variables name.
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 Same variable names? Hmm yes! I'll try to fix it by changing variable names ;d
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 Thanks alot! Something new came.. function markerHit2 (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then return end if getElementType(hitPlayer) == "player" then if getTeamName(getPlayerTeam(hitPlayer)) == "Parademics" then triggerClientEvent (hitPlayer, "openWnd2", hitPlayer) else outputChatBox("You're not in the team for this specific marker!", hitPlayer) end end end Now it opens window if he doesn't have team why?
#DRAGON!FIRE Posted August 15, 2014 Posted August 15, 2014 Thanks alot!Something new came.. function markerHit2 (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then return end if getElementType(hitPlayer) == "player" then if getTeamName(getPlayerTeam(hitPlayer)) == "Parademics" then triggerClientEvent (hitPlayer, "openWnd2", hitPlayer) else outputChatBox("You're not in the team for this specific marker!", hitPlayer) end end end Now it opens window if he doesn't have team why? u must put getElementType in First and u must Check if player have team then Check his team
Et-win Posted August 15, 2014 Posted August 15, 2014 Thanks alot!Something new came.. function markerHit2 (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then return end if getElementType(hitPlayer) == "player" then if getTeamName(getPlayerTeam(hitPlayer)) == "Parademics" then triggerClientEvent (hitPlayer, "openWnd2", hitPlayer) else outputChatBox("You're not in the team for this specific marker!", hitPlayer) end end end Now it opens window if he doesn't have team why? u must put getElementType in First and u must Check if player have team then Check his team He says that the GUI get's opened if he isn't in that team, you can clearly see that this shouldn't be a problem because if he isn't in a team the script doesn't even continue. Btw: You missed an end.
Anubhav Posted August 15, 2014 Author Posted August 15, 2014 Thanks alot!Something new came.. function markerHit2 (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then return end if getElementType(hitPlayer) == "player" then if getTeamName(getPlayerTeam(hitPlayer)) == "Parademics" then triggerClientEvent (hitPlayer, "openWnd2", hitPlayer) else outputChatBox("You're not in the team for this specific marker!", hitPlayer) end end end Now it opens window if he doesn't have team why? u must put getElementType in First and u must Check if player have team then Check his team He says that the GUI get's opened if he isn't in that team, you can clearly see that this shouldn't be a problem because if he isn't in a team the script doesn't even continue. Btw: You missed an end. I din't missed any end, lol. I've the team, it outputs that I don't have the team and opens the GUI. What is the problem?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now