11.06.2015, 07:59
Hello guys,
I made a zombie vs survivors Gamemode,
But, i have one problem;
So, the issue's when i scripted the : Zombie score : and Survivors Score :
It doesn't upgrade when a survivor kill a zombie..
I'll show you my codes,
The textdraws :
the stock for updating the "0" score:
The OnPlayerDeath :
The stock of ending :
Help ? :S
I made a zombie vs survivors Gamemode,
But, i have one problem;
So, the issue's when i scripted the : Zombie score : and Survivors Score :
It doesn't upgrade when a survivor kill a zombie..
I'll show you my codes,
The textdraws :
PHP код:
TDMTD[0] = TextDrawCreate(17.000000, 431.000000, "Team Survivants :");
TextDrawBackgroundColor(TDMTD[0], 255);
TextDrawFont(TDMTD[0], 1);
TextDrawLetterSize(TDMTD[0], 0.500000, 1.000000);
TextDrawColor(TDMTD[0], -1);
TextDrawSetOutline(TDMTD[0], 0);
TextDrawSetProportional(TDMTD[0], 1);
TextDrawSetShadow(TDMTD[0], 1);
TextDrawUseBox(TDMTD[0], 1);
TextDrawBoxColor(TDMTD[0], -2139062102);
TextDrawTextSize(TDMTD[0], 650.000000, -89.000000);
TDMTD[1] = TextDrawCreate(169.000000, 431.000000, "0");
TextDrawBackgroundColor(TDMTD[1], 255);
TextDrawFont(TDMTD[1], 1);
TextDrawLetterSize(TDMTD[1], 0.500000, 1.000000);
TextDrawColor(TDMTD[1], 65535);
TextDrawSetOutline(TDMTD[1], 0);
TextDrawSetProportional(TDMTD[1], 1);
TextDrawSetShadow(TDMTD[1], 1);
TDMTD[2] = TextDrawCreate(401.000000, 430.000000, "Team Zombie:");
TextDrawBackgroundColor(TDMTD[2], 255);
TextDrawFont(TDMTD[2], 1);
TextDrawLetterSize(TDMTD[2], 0.500000, 1.000000);
TextDrawColor(TDMTD[2], 1433087914);
TextDrawSetOutline(TDMTD[2], 0);
TextDrawSetProportional(TDMTD[2], 1);
TextDrawSetShadow(TDMTD[2], 1);
TDMTD[3] = TextDrawCreate(523.000000, 431.000000, "0");
TextDrawBackgroundColor(TDMTD[3], 255);
TextDrawFont(TDMTD[3], 1);
TextDrawLetterSize(TDMTD[3], 0.500000, 1.000000);
TextDrawColor(TDMTD[3], 16711935);
TextDrawSetOutline(TDMTD[3], 0);
TextDrawSetProportional(TDMTD[3], 1);
TextDrawSetShadow(TDMTD[3], 1);
PHP код:
stock TextUpd() {
new SurvivantText[20],ZombieText[20];
format(SurvivantText,sizeof(SurvivantText),"%d",SurvivantScore);
format(ZombieText,sizeof(ZombieText),"%d",ZombieScore);
TextDrawSetString(TDMTD[1], SurvivantText);
TextDrawSetString(TDMTD[3], ZombieText);
}
PHP код:
if(gTeam[killerid] == TEAM_SURVIVANT || gTeam[playerid] == TEAM_ZOMBIE)SurvivantScore++;
if(gTeam[killerid] == TEAM_ZOMBIE|| gTeam[playerid] == TEAM_SURVIVANT)ZombieScore++;
PHP код:
stock TdmEnd() {
new string[64];
if(SurvivantScore > ZombieScore) {
format( string, sizeof(string), "~b~Les Survivants ~g~gagnent");
GameTextForAll(string, 5000, 5);
TdmEndTime = TDM_TIME;
SurvivantScore = 0;
ZombieScore = 0;
TextUpd();
foreach(Player, i) {
if(gTeam[i] == TEAM_SURVIVANT) PlayerPlaySound(i, WIN_SOUND, 0.0, 0.0, 0.0);
else if(gTeam[i] == TEAM_ZOMBIE) PlayerPlaySound(i, lOSE_SOUND, 0.0, 0.0, 0.0);
}