What is that ? Textdraws
#9

Quote:
Originally Posted by AiRaLoKa
Посмотреть сообщение
first, you have to define it...
pawn Код:
new Text:Textdraw6[MAX_PLAYERS]; // So it will make it different for every player
then change evething
from
pawn Код:
Textdraw6
into
pawn Код:
Textdraw6[playerid] //except on the on player death
at the OnPlayerDeath

change
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    kills[killerid]++;
    kills[playerid] = 0;
    TextDrawSetString(Textdraw6, kills);
    return 1;
}
into
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new str[32];
    kills[killerid]++;
    kills[playerid] = 0;
    format(str,sizeof(str,"%d",kills[killerid]);//to convert from integer into string
    TextDrawSetString(Textdraw6[killerid], str);//to set the killer's textdraw
    TextDrawShowForPlayer(killerid,Textdraw6[killerid]);//show the textdraw to killer

    format(str,sizeof(str,"%d",kills[playerid]);//to convert from integer into string
    TextDrawSetString(Textdraw6[playerid], str);//to set the player's textdraw
    TextDrawShowForPlayer(playerid,Textdraw6[playerid]);//show the textdraw to player
    return 1;
}
pawn Код:
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(853) : error 033: array must be indexed (variable "Textdraw6")
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(854) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(855) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(856) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(857) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(858) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(859) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(860) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(869) : error 035: argument type mismatch (argument 2)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(887) : error 035: argument type mismatch (argument 1)
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(888) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


11 Errors.
The code

pawn Код:
Textdraw6 = TextDrawCreate(117.000000, 330.000000, "0");
    TextDrawAlignment(Textdraw6, 2);
    TextDrawBackgroundColor(Textdraw6, 255);
    TextDrawFont(Textdraw6, 3);
    TextDrawLetterSize(Textdraw6, 0.500000, 1.000000);
    TextDrawColor(Textdraw6, -16776961);
    TextDrawSetOutline(Textdraw6, 1);
    TextDrawSetProportional(Textdraw6, 1);
   
    for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw5);
            TextDrawShowForPlayer(i, Textdraw6);
        }
    }

    TextDrawHideForAll(Textdraw6);
    TextDrawDestroy(Textdraw6);
Reply


Messages In This Thread
What is that ? Textdraws - by Le3aT - 12.06.2014, 21:02
Re: What is that ? Textdraws - by Abagail - 12.06.2014, 21:53
Re: What is that ? Textdraws - by Le3aT - 12.06.2014, 21:55
Re: What is that ? Textdraws - by AiRaLoKa - 12.06.2014, 21:59
Re: What is that ? Textdraws - by Le3aT - 12.06.2014, 22:06
Re: What is that ? Textdraws - by Le3aT - 12.06.2014, 23:32
Re: What is that ? Textdraws - by SilentSoul - 12.06.2014, 23:54
Re: What is that ? Textdraws - by AiRaLoKa - 13.06.2014, 00:01
Re: What is that ? Textdraws - by Le3aT - 13.06.2014, 00:54
Re: What is that ? Textdraws - by AiRaLoKa - 13.06.2014, 01:06

Forum Jump:


Users browsing this thread: 1 Guest(s)