gdog12356 Posted April 10, 2011 Author Share Posted April 10, 2011 Hello, i was wondering if i could have class A and B not able to attack eachother. But class A and B CAN attack classes C and D. Vice versa with C + D, allies basicly. I want to have certain classes not able to pvp other classes. Like for a naruto game, leaf village - Uchiha (would be considered a class) and leaf - Hyuuga (another class). origins would caunt them as 2 diffrent classes, so i want to disable them from attacking another. Link to comment Share on other sites More sharing options...
LordxCyrus Posted April 10, 2011 Share Posted April 10, 2011 source maybe? Link to comment Share on other sites More sharing options...
Death Knight Posted April 10, 2011 Share Posted April 10, 2011 @Forgotten:> source maybe?Well, it has to be in the source. But I think Blue wants a more specific answer then two words that mean almost nothing. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 10, 2011 Share Posted April 10, 2011 Open server.vbp and add the following above:``` CanPlayerAttackPlayer = True```in Function CanPlayerAttackPlayer:``` If GetPlayerClass(attacker) = GetPlayerClass(victim) Then Exit Function Select Case GetPlayerClass(attacker) Case 1 ' attacker is class 1 If GetPlayerClass(victim) = 2 Then Exit Function ' they're allied with class2 ' is the victim class2? Case 2 ' attacker is class 2 If GetPlayerClass(victim) = 1 Then Exit Function Case 3 ' attacker is class 3 If GetPlayerClass(victim) = 4 Then Exit Function ' they're allied with class4 ' is the victim class4? Case 4 ' attacker is class 4 If GetPlayerClass(victim) = 3 Then Exit Function End Select```Remember: You can add this anywhere above:``` CanPlayerAttackPlayer = True``` Link to comment Share on other sites More sharing options...
gdog12356 Posted April 10, 2011 Author Share Posted April 10, 2011 @Soul:> Open server.vbp and add the following above:> > ```> CanPlayerAttackPlayer = True> > ```in Function CanPlayerAttackPlayer:> ```> > If GetPlayerClass(attacker) = GetPlayerClass(victim) Then Exit Function> Select Case GetPlayerClass(attacker)> Case 1 ' attacker is class 1> If GetPlayerClass(victim) = 2 Then Exit Function ' they're allied with class2> ' is the victim class2?> Case 2 ' attacker is class 2> If GetPlayerClass(victim) = 1 Then Exit Function> > Case 3 ' attacker is class 3> If GetPlayerClass(victim) = 4 Then Exit Function ' they're allied with class4> ' is the victim class4?> Case 4 ' attacker is class 4> If GetPlayerClass(victim) = 3 Then Exit Function> End Select> > ```> Remember: You can add this anywhere above:> ```> CanPlayerAttackPlayer = True> > ```thanx u da best :) Link to comment Share on other sites More sharing options...
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