Moin Breadfisher,
Ich hätte ne frage
unzwar ich habe nen Teamdeathmach Script gescriptet
und ich will , sobald der Spieler in team 1 (cops) automatisch ohne befehl zu Team2 (zombies)welchselt
hier der Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(Team[playerid] == TEAM_ZOMBIE && Team[killerid] == TEAM_SURVIVAL)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid,250);
}
else if(Team[playerid] == TEAM_SURVIVAL && Team[killerid] == TEAM_ZOMBIE)
{
SetPlayerTeam(playerid,GetPlayerTeam(playerid == TEAM_SURVIVAL));
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid,250);
}
else if(Team[playerid] == TEAM_SURVIVAL && Team[killerid] == TEAM_SURVIVAL)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)-1);
GameTextForPlayer(killerid,"KEIN TEAMKILL!",2000,3);
GivePlayerMoney(killerid,-200);
GivePlayerMoney(playerid,200);
SendClientMessage(playerid,COLOR_RED,"Du erh�ltst 200 $ vom Teamkiller");
}
else if(Team[playerid] == TEAM_ZOMBIE && Team[killerid] == TEAM_ZOMBIE)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)-1);
GameTextForPlayer(killerid,"KEIN TEAMKILL!",2000,3);
GivePlayerMoney(killerid,-200);
GivePlayerMoney(playerid,200);
SendClientMessage(playerid,COLOR_RED,"Du erh�ltst 200 $ vom Teamkiller");
}
return 1;
}