05.03.2009, 00:59
i want to make a scoreboard in the bottom left of the screen obn my server, and i want to make it so when grove kills ballas they get a point and the other way around, deathmatch style. how do i do that?
new Text:TextDrawScore; new String[50]; new TextDrawTimer; new Kills[MAX_PLAYERS]; new Team1Kills, Team2Kills; static gTeam[MAX_PLAYERS]; forward GetPlayersScores();
TextDrawScore = CreateTextDraw(...); TextDrawTimer = SetTimer("GetPlayersScores", 1000, true); Other Textdraw Properties.
KillTimer(TextDrawTimer);
for ( new i = 0; i < MAX_PLAYERS; i++ ) { for ( new j = 0; j < Kills[i]; j++ ) { if ( gTeam[i] == 1 ) { Team1Kills++; } else if ( gTeam[i] == 2 ) { Team2Kills++; } } } format(String, sizeof String, "Team 1 Kills: %d\nTeam 2 Kills: %d", Team1Kills, Team2Kills); TextDrawDestroy(...); TextDrawSetString(...); TextDrawShowForAll(...);
new Text:TextDrawScore; new TextDrawTimer; new Kills[MAX_PLAYERS]; new Team1Kills, Team2Kills; static gTeam[MAX_PLAYERS]; forward GetPlayersScores();
TextDrawScore = TextDrawCreate(600.0, 430.0, " "); TextDrawTimer = SetTimer("GetPlayersScores", 1000, true); TextDrawLetterSize(TextDrawScore, 0.4, 0.7); TextDrawUseBox(TextDrawScore, 1); TextDrawBoxColor(TextDrawScore, 0x0000FFFF);
KillTimer(TextDrawTimer);
for ( new i = 0; i < MAX_PLAYERS; i++ ) { for ( new j = 0; j < Kills[i]; j++ ) { if ( gTeam[i] == 1 ) { Team1Kills++; } else if ( gTeam[i] == 2 ) { Team2Kills++; } } } new String[50]; format(String, 50, "Team 1 Kills: %d\nTeam 2 Kills: %d", Team1Kills, Team2Kills); TextDrawHideForAll(TextDrawScore); TextDrawSetString(String); TextDrawShowForAll(TextDrawScore);
Kills[killerid]++;
C:\Users\rac\Desktop\gtasa and samp\gamemodes\choice.pwn(95) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
TextDrawSetString(String);
TextDrawSetString(Text:text,string[]);
C:\Users\rac\Desktop\gtasa and samp\gamemodes\choice.pwn(95) : error 017: undefined symbol "text" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.