Adistar Posted January 27, 2013 Share 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 Link to comment
Cruze Posted January 29, 2013 Share Posted January 29, 2013 Maybe this? if (not getPlayerFromTeam("criminal")) then outputChatbox ("You aren't a criminal",0,250,0") Link to comment
Adistar Posted January 29, 2013 Author Share Posted January 29, 2013 If not*, well thanks will try but it was ment on a class(from a spawnpanel), not team.. Link to comment
iPrestege Posted January 30, 2013 Share Posted January 30, 2013 i hope it works lol. getPlayerFromTeam = ?? you mean = getPlayerTeamFrom ? Link to comment
ViRuZGamiing Posted January 30, 2013 Share 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 Link to comment
Baseplate Posted January 30, 2013 Share Posted January 30, 2013 if (not getPlayerTeam(getTeamFromName("criminal"))) then outputChatBox("You aren't a criminal", 0, 250, 0) Link to comment
damien111 Posted January 30, 2013 Share 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. Link to comment
Adistar Posted January 30, 2013 Author Share Posted January 30, 2013 Not working Cruz, but I wanted to know what Damien said. Thanks Link to comment
Anderl Posted January 30, 2013 Share 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. Link to comment
damien111 Posted January 30, 2013 Share 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 Link to comment
Anderl Posted January 30, 2013 Share 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. Link to comment
Adistar Posted January 30, 2013 Author Share 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 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