ID 0 can team kill.. [UNSOLVED] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ID 0 can team kill.. [UNSOLVED] (
/showthread.php?tid=91825)
ID 0 can team kill.. [UNSOLVED] -
_Vortex - 16.08.2009
Hello, I have a script that disables people from teamkilling, it works on everyone but ID 0..
I dont know why, but heres the script.
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
if (gTeam[playerid] == TEAM_TRIAD)
{
SetPlayerTeam(playerid, TEAM_TRIAD);
}
else if (gTeam[playerid] == TEAM_CASINO)
{
SetPlayerTeam(playerid, TEAM_CASINO);
}
else if (gTeam[playerid] == TEAM_POLICE)
{
SetPlayerTeam(playerid, TEAM_POLICE);
}
else if (gTeam[playerid] == TEAM_MAFIA)
{
SetPlayerTeam(playerid, TEAM_MAFIA);
}
else if (gTeam[playerid] == TEAM_ARMY)
{
SetPlayerTeam(playerid, TEAM_ARMY);
}
else if (gTeam[playerid] == TEAM_REDNECK)
{
SetPlayerTeam(playerid, TEAM_REDNECK);
}
else if (gTeam[playerid] == TEAM_PILOT)
{
SetPlayerTeam(playerid, TEAM_PILOT);
}
else if (gTeam[playerid] == TEAM_RAIL)
{
SetPlayerTeam(playerid, TEAM_RAIL);
}
else if (gTeam[playerid] == TEAM_ADMIN && IsPlayerAdmin(playerid))
{
SetPlayerTeam(playerid, TEAM_ADMIN);
GivePlayerWeapon(playerid, 46, 500);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You're not an Administrator! Choose another team!");
SetPlayerHealth(playerid, 0.0);
ForceClassSelection(playerid);
}
return 1;
}
How can I fix this?
Re: ID 0 can team kill.. -
kavkus - 16.08.2009
ID 0 On The Server?
Or ID 0 From the Teams?
Re: ID 0 can team kill.. -
_Vortex - 16.08.2009
Quote:
Originally Posted by kavkus
ID 0 On The Server?
Or ID 0 From the Teams?
|
On the server, when someone has the id 0, and they shoot someone on their team, there team mate takes damage, from id 0..
Re: ID 0 can team kill.. -
kavkus - 16.08.2009
Okay, i understand,
but why u post OnPlayerSpawn?
I Dont know your prob,
when ID 1 shoot at an other ID they take damage too or?
Re: ID 0 can team kill.. -
_Vortex - 16.08.2009
Omg, ONLY ID 0 CAN TEAM KILL. If you dont know how to help, dont reply