Adistar Posted January 27, 2013 Posted January 27, 2013 Hello, I'm busy on a turfing system, credits to Manves turfingscripts which he sent on the mta community. Well, I got a spawnpanel and I would like to know how I could lock turf to a spawn. So that not everyone can turf but only people who are allowed to. In a summary; I wanna know how to lock turf to a spawn . Sincerely yours, Adistar Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!
Cruze Posted January 29, 2013 Posted January 29, 2013 Maybe this? if (not getPlayerFromTeam("criminal")) then outputChatbox ("You aren't a criminal",0,250,0")
Adistar Posted January 29, 2013 Author Posted January 29, 2013 If not*, well thanks will try but it was ment on a class(from a spawnpanel), not team.. Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!
iPrestege Posted January 30, 2013 Posted January 30, 2013 i hope it works lol. getPlayerFromTeam = ?? you mean = getPlayerTeamFrom ?
ViRuZGamiing Posted January 30, 2013 Posted January 30, 2013 if not getPlayerTeam("criminal")) then outputChatbox ("You aren't a criminal",0,250,0") It's getPlayerTeam: On Mta Wiki you'll find it "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Baseplate Posted January 30, 2013 Posted January 30, 2013 if (not getPlayerTeam(getTeamFromName("criminal"))) then outputChatBox("You aren't a criminal", 0, 250, 0)
damien111 Posted January 30, 2013 Posted January 30, 2013 Ah, you mean like, element data? The class , element data? If so function checkUser( playerargument ) class = getElementData( playerargument, "Class") -- replace playergument with the player agument you used. if ( class == "ClassNameToCheck" ) then -- change "ClassNameToCheck" to the class you want to check end end Untested but thats the general idea.
Adistar Posted January 30, 2013 Author Posted January 30, 2013 Not working Cruz, but I wanted to know what Damien said. Thanks Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!
Anderl Posted January 30, 2013 Posted January 30, 2013 Record 3 script tries from different people and still none is right lol if ( getTeamFromName ( "Criminal" ) ~= getPlayerTeam( PLAYER_ELEMENT ) ) then outputChatBox ( "You aren't a criminal!", 0, 250, 0 ); end This, if it's in the client side. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
damien111 Posted January 30, 2013 Posted January 30, 2013 Record 3 script tries from different people and still none is right lol if ( getTeamFromName ( "Criminal" ) ~= getPlayerTeam( PLAYER_ELEMENT ) ) then outputChatBox ( "You aren't a criminal!", 0, 250, 0 ); end This, if it's in the client side. Please reade the replys before replying, this has been solved, and thats not what he wanted
Anderl Posted January 30, 2013 Posted January 30, 2013 Record 3 script tries from different people and still none is right lol if ( getTeamFromName ( "Criminal" ) ~= getPlayerTeam( PLAYER_ELEMENT ) ) then outputChatBox ( "You aren't a criminal!", 0, 250, 0 ); end This, if it's in the client side. Please reade the replys before replying, this has been solved, and thats not what he wanted Did I say it was for him? It was the fixed code of these three guys that tried to give him an example. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Adistar Posted January 30, 2013 Author Posted January 30, 2013 Nevermind, I found it out why I was wrong.. I had to add this line; if getElementData(localPlayer,"class") == "Name" then Well thanks for helping me out Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!
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