Hallo Leute,
ich brauche eure hilfe!
Und zwar bin ich gerade dabei eine Arena für Team-Deathmatch im Seeschlacht-Style zu Scripten.
Es gibt 2 Teams und jeder Spieler soll die Mitglieder aus seinem Team auf der Karte sehen,
sie sollen Grün markiert sein. Die Mitglieder des gegnerischen Teams sollen nicht sichtbar sein.
Ich poste mal dazu die Zeilen was passieren soll, wenn ein Spieler Team 1 beitritt.
Ab "for(new i = 0; i < MAX_PLAYERS; i++)" geht es los mit dem Markern..
case DIALOG_SEAFIGHT:
{
if(listitem == 0) //TEAM-1
{
if(SpielerInfo[playerid][pSeFiTeam] != 0)return SendClientMessage(playerid,ROT,"Du bist bereits in einer Arena!"); //Ob der Spieler überhaupt in einem Team/Arena ist, wenn '0' dann ist er in keinem Team/Arena.
{
new name[MAX_PLAYER_NAME], string2[56], string1[56];
GetPlayerName(playerid, name, sizeof(name));
SF_OBJECT_1=CreatePlayerObject(playerid,10771,6071.70019531,356.89999390,4.59999990,0.00000000,0.00000000,0.00000000);
SF_OBJECT_2=CreatePlayerObject(playerid,11146,6062.70019531,357.45599365,11.44499969,0.00000000,0.00000000,0.00000000);
SF_OBJECT_3=CreatePlayerObject(playerid,10770,6074.93017578,349.36499023,37.79999924,0.00000000,0.00000000,0.00000000);
SF_OBJECT_4=CreatePlayerObject(playerid,11149,6065.58496094,351.70999146,11.10999966,0.00000000,0.00000000,0.00000000);
SF_OBJECT_5=CreatePlayerObject(playerid,11145,6008.79980469,356.89999390,3.40000010,0.00000000,0.00000000,0.00000000);
SF_OBJECT_6=CreatePlayerObject(playerid,11237,6074.93505859,349.36499023,37.79999924,0.00000000,0.00000000,0.00000000);
SF_OBJECT_7=CreatePlayerObject(playerid,10771,6479.60009766,498.00000000,4.59999990,0.00000000,0.00000000,203.99993896);
SF_OBJECT_8=CreatePlayerObject(playerid,10770,6473.58496094,503.57501221,37.79999924,0.00000000,0.00000000,204.00000000);
SF_OBJECT_9=CreatePlayerObject(playerid,11237,6473.58007812,503.57199097,37.79999924,0.00000000,0.00000000,204.00000000);
SF_OBJECT_10=CreatePlayerObject(playerid,11145,6537.04003906,523.57000732,3.40000010,0.00000000,0.00000000,204.00000000);
SF_OBJECT_11=CreatePlayerObject(playerid,11146,6488.04003906,501.14001465,11.44299984,0.00000000,0.00000000,204.00000000)
SF_OBJECT_12=CreatePlayerObject(playerid,11149,6483.10009766,505.20001221,11.10000038,0.00000000,0.00000000,204.00000000);
SFHEALT2=CreatePlayer3DTextLabel(playerid,"/heal",WEISS,6474.6670,483.9473,10.3492,20.0);
SFARMOURT2=CreatePlayer3DTextLabel(playerid,"/armour",WEISS,6477.1675,485.1533,10.3492,20.0);
SFHEALT1=CreatePlayer3DTextLabel(playerid,"/heal",WEISS,6083.6875,367.4975,10.3512,20.0);
SFARMOURT1=CreatePlayer3DTextLabel(playerid,"/armour",WEISS,6079.9624,367.4076,10.3512,20.0);
SFABTEILT1=CreatePlayer3DTextLabel(playerid,"/abteilung",WEISS,6087.6875,367.4975,10.3512,20.0);
SFABTEILT2=CreatePlayer3DTextLabel(playerid,"/abteilung",WEISS,6472.3398,482.8468,10.3492,20.0);
SetPlayerPos(playerid,6078.8999,362.6355,10.3512);
SetPlayerMapIcon(playerid,2,6078.8999,362.6355,10.3512,57,0,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,1,6475.4189,489.6382,10.3492,5,0,MAPICON_GLOBAL);
SetPlayerFacingAngle(playerid,180);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,1);
SpielerInfo[playerid][pSeFiTeam] = 1;
SetPVarInt(playerid,"SeFiAbteil",0);
mysql_SetInt("accounts","SeFiTeam",1,"Name",SpielerInfo[playerid][pName]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) //Ob der Spieler Online ist.
{
if(GetPVarInt(i,"SeFiTeam") == 1) //Ob der Spieler in Team 1 ist.
{
SetPlayerMarkerForPlayer(i,playerid,GRUEN); // Teammitglied wird grün angezeigt.
format(string1, sizeof(string1), "--> %s ist deinem Team beigetreten!", name);
SendClientMessage(i,GRUEN,string1);
}
if(GetPVarInt(i,"SeFiTeam") == 2) //Ob der Spieler in Team 2 ist.
{
SetPlayerMarkerForPlayer(i,playerid,00); // Spieler wird für Gegner nicht angezeigt.
format(string2, sizeof(string2), "--> %s ist Team 1 beigetreten!", name);
SendClientMessage(i,GRUEN,string2);
}
}
}
return 1;
}
}
Ich hoffe irgendwer kann mir sagen, zeigen und erklären was ich da falsch gemacht habe.
Mit freundlichen Grüßen
Alpha