Hallo liebe Community,
ich habe folgends Problem mit meinem Script,
Ich habe eine TextDraw anzeige wo die Kills von 2 Gangs angezeigt wird diese sollten nach kills von den 2 Fraktionen aktualisiert werden dies wird auch manchmal gemacht aber nicht immer.
Ich hoffe mir kann jemand dabei helfen hier mal ein paar ausschnitte:
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
switch (classid)
{
case 0:
{
GameTextForPlayer(playerid, "~COLOR_GREEN~Grove Street", 1200, 3);
gTeam[playerid] = TEAM_GROVE;
SetPlayerColor(playerid,COLOR_GREEN); // Lila
}
case 1:
{
GameTextForPlayer(playerid, "~COLOR_PURPLE~Ballas Family", 1200, 3);
gTeam[playerid] = TEAM_BALLAS;
SetPlayerColor(playerid,COLOR_PURPLE); // GREEN
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, Gangfightzone, -66);
GangZoneShowForPlayer(playerid, GroveStreetBase, 16711888);
GangZoneShowForPlayer(playerid, BallasBase, -65332);
GangZoneFlashForAll(Gangfightzone,COLOR_RED2);
if(gTeam[playerid] == TEAM_GROVE)
{
GivePlayerWeapon(playerid,24,9999);
GivePlayerWeapon(playerid,31,9999);
GivePlayerWeapon(playerid,29,9999);
SetPlayerColor(playerid, 0x33AA33AA);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerTeam(playerid, TEAM_GROVE);
Grove(playerid);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 2498.4678,-1683.5477,13.3831);
TextDrawShowForPlayer(playerid, Textdraw);
}
else if(gTeam[playerid] == TEAM_BALLAS)
{
GivePlayerWeapon(playerid,24,9999);
GivePlayerWeapon(playerid,31,9999);
GivePlayerWeapon(playerid,29,9999);
SetPlayerColor(playerid, 0xFFFF00AA);
SetPlayerHealth(playerid, 100);
SetPlayerTeam(playerid, TEAM_BALLAS);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid, 100);
Ballas(playerid);
SetPlayerPos(playerid, 2520.7314,-2017.1422,13.5469);
TextDrawShowForPlayer(playerid, Textdraw);
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(playerid, 100, 2754.2024,-1657.8087,12.6736,61.3029))
{
if(killerid == 1)
{
GameTextForPlayer(killerid, "~g~GANGZONE~r~KILL", 5000, 5);
Ballasscore += 1;
if(killerid != Ballasscore) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
else if(killerid == 0)
{
GameTextForPlayer(killerid, "~g~GANGZONE~r~KILL", 5000, 5);
Grovescore += 1;
if(killerid != Grovescore) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
return 1;
}
}
public PunkteUpdate()
{
new string[100];
TextDrawHideForAll(Text:scores);
format(string,sizeof(string),"~p~Ballas:%d ~w~--------~g~Grove:%d", Ballasscore,Grovescore);
scores = TextDrawCreate(271.000000,400.000000,string);
TextDrawTextSize(scores,200.000000,0.000000);
TextDrawSetOutline(scores,1);
TextDrawSetShadow(scores,1);
TextDrawShowForAll(Text:scores);
}
public PunkteCheck(playerid)
{
if (Grovescore >= 50) {
Grovescore = 0;
Ballasscore = 0;
GameTextForAll("~g~Grove haben Gewonnen",6000,5);
SetPlayerHealth(playerid, 0);
GangZoneStopFlashForAll(Gangfightzone);
SetTimer("Finish",MAX_GM_TIME,true);
}
if (Ballasscore >= 50) {
Grovescore = 0;
Ballasscore = 0;
GameTextForAll("~y~Ballas haben Gewonnen",6000,5);
SetPlayerHealth(playerid, 0);
GangZoneStopFlashForAll(Gangfightzone);
SetTimer("Finish",MAX_GM_TIME,true);
}
}
ich hoffe Ihr könnt damit was anfangen ich wäre euch echt dankbar.. wenn mir wer weiterhelfen kannst.
mfg
DashaSe