[Pedido] Sistema de Hits Por Favor
#1

HitS Voce Sabe ne Quando o Cara da um Tiro no Inimigo (+1)Hits ae ele vai acertando + ae aquele numero vai aumento
to fazendo em textdraw preciso so do sistema mesmo
Reply
#2

public OnGameModeInit():

pawn Код:
new String[20];
format(String, sizeof(String), "Score: %d", GetPlayerScore(playerid));
TextDrawSetString(Textdraw0[playerid], String);
TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason):

pawn Код:
new String[20];
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
format(String, sizeof(String), "Score: %d", GetPlayerScore(killerid));
TextDrawSetString(Textdraw0[killerid], String);
TextDrawShowForPlayer(killerid, Textdraw0[killerid]);
return 1;
}
Cуdigo criado por: Kuddy

Caso queira saber mais, veja o tуpico dele:
https://sampforum.blast.hk/showthread.php?tid=358422
Reply
#3

#EDIT


Tentas:
pawn Код:
// Criamos as variбveis
    new
        Dano[MAX_PLAYERS][MAX_PLAYERS],
        Time[MAX_PLAYERS char]
    ;
   
    public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
    {
        // Faremos um limitador de dano, caso passe 10seg sem ele dar tiro em alguйm o dano й resetado.
        if(gettime() - Time{playerid} >= 10) Dano[playerid][demageid] = 0;
       
        // Criamos umas arrays que armazenarгo uma string.
        new Str[100];
       
        // Formatamos nossa array
        format(Str, sizeof(Str),"~n~~n~~n~~n~~n~~n~Dano:%f.1", Dano[playerid][demageid]);
       
        // Exibimos no кcra do player(Tela)
        GameTextForPlayer(playerid, Str, 3000, 1)
       
        // Incrementamos o dano +=
        Dano[playerid][demageid] ++;
       
        // Pegamos a ъltima vez que o player atirou em alguйm
        Time{playerid} = gettime();
        return 1;
    }
Reply
#4

Acho q nao entenderam D:

HitS = Combo de Tiro Tipo acertei 10 tiro no inimigo a la na Text Draw aparece +10 HitS
Reply
#5

Quote:
Originally Posted by rugal
Посмотреть сообщение
Acho q nao entenderam D:

HitS = Combo de Tiro Tipo acertei 10 tiro no inimigo a la na Text Draw aparece +10 HitS
Foi oque eu postei acima.
Reply
#6

nao funciono comigo D:
Reply
#7

Oque aparece?
Reply
#8

DANO:0.00000 Aparece isso
Reply
#9

Up alguem tem ae ?
Reply
#10

http://pastebin.com/PscH0EDP

Retirado do meu gamemode de Team Death Match,

Crйditos a min.

Garfield / iSuYANw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)