[HELP] Script for Anti-Team kill [HELP] -
Fantje - 27.02.2015
Hiya!
I need a script for Anti-Team mate kill, so you CAN'T kill team mates.
Thanks!
Re: [HELP] Script for Anti-Team kill [HELP] -
CalvinC - 27.02.2015
Just set players to the same team with
SetPlayerTeam, then they cannot damage eachother.
Re: [HELP] Script for Anti-Team kill [HELP] -
Fantje - 27.02.2015
Mmm, can you help a bit? thanks btw
Re: [HELP] Script for Anti-Team kill [HELP] -
CalvinC - 27.02.2015
Help with what?
There's a lot of information on the wiki.
Re: [HELP] Script for Anti-Team kill [HELP] -
Fantje - 27.02.2015
Where I need to add the script?
Re: [HELP] Script for Anti-Team kill [HELP] -
CalvinC - 27.02.2015
The wiki has information on pretty much everything you'd need, but what do you need help with?
Re: [HELP] Script for Anti-Team kill [HELP] -
Fantje - 27.02.2015
Okay, that script: public OnPlayerSpawn(playerid)
{
// Set a player's team to 4 when they spawn
SetPlayerTeam(playerid, 4);
return 1;
}
Do I need to add SetPlayerTeam(playerid, 4); by OnPlayerSpawn section?
Re: [HELP] Script for Anti-Team kill [HELP] -
CalvinC - 27.02.2015
SetPlayerTeam(playerid, teamid) where-ever you want to set the player's team.
Using that, will set the player's team to 4, when they spawn, as it pretty much says.
But you can just use team 0, 1, 2, 3 or anything else.
As long as the team ID of one player is the same as the other player, they cannot damage eachother, so if you want nobody to be able to damage eachother, that should work fine.
AW: [HELP] Script for Anti-Team kill [HELP] -
Nero_3D - 27.02.2015
You could also only use
AddPlayerClassEx instead of AddPlayerClass
They do both the same just that the first has an additional team parameter
Re: [HELP] Script for Anti-Team kill [HELP] -
Fantje - 27.02.2015
EDIT: FIXED! Thanks guys