Anubhav Posted August 15, 2014 Share 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/ Link to comment
Anubhav Posted August 15, 2014 Author Share 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? Link to comment
#DRAGON!FIRE Posted August 15, 2014 Share 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 . Link to comment
Anubhav Posted August 15, 2014 Author Share Posted August 15, 2014 I used resourceRoot at second arguement. Link to comment
Et-win Posted August 15, 2014 Share Posted August 15, 2014 Check if the source == marker, lol. Link to comment
Anubhav Posted August 15, 2014 Author Share 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(...) Link to comment
#DRAGON!FIRE Posted August 15, 2014 Share 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 . Link to comment
Et-win Posted August 15, 2014 Share 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. Link to comment
Anubhav Posted August 15, 2014 Author Share 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! Link to comment
Markeloff Posted August 15, 2014 Share Posted August 15, 2014 Maybe because you are using the same variables name. Link to comment
Anubhav Posted August 15, 2014 Author Share Posted August 15, 2014 Same variable names? Hmm yes! I'll try to fix it by changing variable names ;d Link to comment
Anubhav Posted August 15, 2014 Author Share 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? Link to comment
#DRAGON!FIRE Posted August 15, 2014 Share 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 Link to comment
Et-win Posted August 15, 2014 Share 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. Link to comment
Anubhav Posted August 15, 2014 Author Share 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? Link to comment
Arnold-1 Posted August 16, 2014 Share Posted August 16, 2014 u guyz wot? i will help anbhav on skype. Link to comment
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