31.07.2009, 20:11
Hello, I'm making a mod there are 2 teams but if anyone shoot anyone from the same team I don't want that the health changes, anybody know how to do that?? Thank you..
|
Originally Posted by MadeMan
You have to set up the SAMP native teams with SetPlayerTeam or AddPlayerClassEx then the anti-teamkill is on.
https://sampwiki.blast.hk/wiki/SetPlayerTeam https://sampwiki.blast.hk/wiki/AddPlayerClassEx |
|
Originally Posted by ► James_Alex
juste freeze the player health when a player in the same team attack you
set a timer, and set the health the same in the timer ![]() |
|
Originally Posted by ► James_Alex
juste freeze the player health when a player in the same team attack you
set a timer, and set the health the same in the timer ![]() |
|
Originally Posted by Don Correlli
Quote:
|
// Forwards
forward SettingPlayerTeam();
// OnGameModeInit
SetTimer("SettingPlayerTeam", 10, 1);
// On the end of your script
public SettingPlayerTeam()
{
for(new i; i< MAX_PLAYERS; i++) SetPlayerTeam(i, gTeam[i]);
return 1;
}
|
Originally Posted by SpiderPork
NOTE: I did not make this:
pawn Код:
But you can easily just use SetPlayerTeam under OnPlayerSpawn. |