Jump to content

Turfing question.


Adistar

Recommended Posts

Posted

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 :P.

Sincerely yours,

Adistar

Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!

Posted

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)!

Posted
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."

Posted

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.

Posted

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

Posted
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 :S

Posted
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 :S

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

Posted

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)!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...