Score doesn't Upgrade..
#1

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 :

PHP код:
TDMTD[0] = TextDrawCreate(17.000000431.000000"Team Survivants :");
    
TextDrawBackgroundColor(TDMTD[0], 255);
    
TextDrawFont(TDMTD[0], 1);
    
TextDrawLetterSize(TDMTD[0], 0.5000001.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.000000431.000000"0");
    
TextDrawBackgroundColor(TDMTD[1], 255);
    
TextDrawFont(TDMTD[1], 1);
    
TextDrawLetterSize(TDMTD[1], 0.5000001.000000);
    
TextDrawColor(TDMTD[1], 65535);
    
TextDrawSetOutline(TDMTD[1], 0);
    
TextDrawSetProportional(TDMTD[1], 1);
    
TextDrawSetShadow(TDMTD[1], 1);
    
TDMTD[2] = TextDrawCreate(401.000000430.000000"Team Zombie:");
    
TextDrawBackgroundColor(TDMTD[2], 255);
    
TextDrawFont(TDMTD[2], 1);
    
TextDrawLetterSize(TDMTD[2], 0.5000001.000000);
    
TextDrawColor(TDMTD[2], 1433087914);
    
TextDrawSetOutline(TDMTD[2], 0);
    
TextDrawSetProportional(TDMTD[2], 1);
    
TextDrawSetShadow(TDMTD[2], 1);
    
TDMTD[3] = TextDrawCreate(523.000000431.000000"0");
    
TextDrawBackgroundColor(TDMTD[3], 255);
    
TextDrawFont(TDMTD[3], 1);
    
TextDrawLetterSize(TDMTD[3], 0.5000001.000000);
    
TextDrawColor(TDMTD[3], 16711935);
    
TextDrawSetOutline(TDMTD[3], 0);
    
TextDrawSetProportional(TDMTD[3], 1);
    
TextDrawSetShadow(TDMTD[3], 1); 
the stock for updating the "0" score:
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);

The OnPlayerDeath :

PHP код:
if(gTeam[killerid] == TEAM_SURVIVANT || gTeam[playerid] == TEAM_ZOMBIE)SurvivantScore++;
    if(
gTeam[killerid] == TEAM_ZOMBIE|| gTeam[playerid] == TEAM_SURVIVANT)ZombieScore++; 
The stock of ending :

PHP код:
stock TdmEnd() {
    new 
string[64];
    if(
SurvivantScore ZombieScore) {
            
formatstringsizeof(string), "~b~Les Survivants ~g~gagnent");
            
GameTextForAll(string50005);
            
TdmEndTime TDM_TIME;
            
SurvivantScore 0;
            
ZombieScore 0;
            
TextUpd();
            foreach(
Playeri) {
                if(
gTeam[i] == TEAM_SURVIVANTPlayerPlaySound(iWIN_SOUND0.00.00.0);
                else if(
gTeam[i] == TEAM_ZOMBIEPlayerPlaySound(ilOSE_SOUND0.00.00.0);
            } 
Help ? :S
Reply


Messages In This Thread
Score doesn't Upgrade.. - by KillerDVX - 11.06.2015, 07:59
Re: Score doesn't Upgrade.. - by mamorunl - 11.06.2015, 08:20
Re : Score doesn't Upgrade.. - by KillerDVX - 11.06.2015, 09:17
Re: Score doesn't Upgrade.. - by JaKe Elite - 11.06.2015, 09:26
AW: Score doesn't Upgrade.. - by NaS - 11.06.2015, 10:15
Re : Score doesn't Upgrade.. - by KillerDVX - 11.06.2015, 13:15
Re : Score doesn't Upgrade.. - by KillerDVX - 11.06.2015, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)