SA-MP Forums Archive
[Ajuda] Cod - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Cod (/showthread.php?tid=353790)



[Ajuda] Cod - goku114 - 24.06.2012

criei esse cod


PHP код:
    SetTimer("att2"1000true); 
pawn Код:
forward att2(playerid);
public att2(playerid)
{
    for(new C = 0; C < MAX_PLAYERS; C++)
    {
     new Str2[15];
     format(Str2, sizeof(Str2), "Matou: %d", PlayerDados[playerid][Matou]);
     TextDrawSetString(matou[C], Str2);
     }
     return 1;
     }[pawn]
for(new C = 0; C < MAX_PLAYERS; C++)
{
matou[C] = TextDrawCreate(20.000000, 186.000000, "_");
TextDrawBackgroundColor(matou[C], 255);
TextDrawFont(matou[C], 2);
TextDrawLetterSize(matou[C], 0.260000, 1.200000);
TextDrawColor(matou[C], -1);
TextDrawSetOutline(matou[C], 0);
TextDrawSetProportional(matou[C], 1);
TextDrawSetShadow(matou[C], 1);
}
[/pawn]

o proble й que fica sempre em zero


Re: [Ajuda] Cod - .FuneraL. - 24.06.2012

Quote:
Originally Posted by goku114
Посмотреть сообщение
criei esse cod


PHP код:
    SetTimer("att2"1000true); 
pawn Код:
forward att2(playerid);
public att2(playerid)
{
    for(new C = 0; C < MAX_PLAYERS; C++)
    {
     new Str2[15];
     format(Str2, sizeof(Str2), "Matou: %d", PlayerDados[playerid][Matou]);
     TextDrawSetString(matou[C], Str2);
     }
     return 1;
     }[pawn]
for(new C = 0; C < MAX_PLAYERS; C++)
{
matou[C] = TextDrawCreate(20.000000, 186.000000, "_");
TextDrawBackgroundColor(matou[C], 255);
TextDrawFont(matou[C], 2);
TextDrawLetterSize(matou[C], 0.260000, 1.200000);
TextDrawColor(matou[C], -1);
TextDrawSetOutline(matou[C], 0);
TextDrawSetProportional(matou[C], 1);
TextDrawSetShadow(matou[C], 1);
}
[/pawn]

o proble й que fica sempre em zero
pawn Код:
//OnPlayerDeath

PlayerDados[killerid][pMatou]++;



Re: [Ajuda] Cod - goku114 - 24.06.2012

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
//OnPlayerDeath

PlayerDados[killerid][pMatou]++;
ja tinha isso aso esqueci de posta

SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
GivePlayerMoney(killerid, 10000);
PlayerDados[playerid][Morreu]++;
PlayerDados[killerid][Matou]++;


Re: [Ajuda] Cod - .FuneraL. - 24.06.2012

Quote:
Originally Posted by goku114
Посмотреть сообщение
ja tinha isso aso esqueci de posta

SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
GivePlayerMoney(killerid, 10000);
PlayerDados[playerid][Morreu]++;
PlayerDados[killerid][Matou]++;
Nгo й necessario aquele loop na public, retire, e troque o "C" por playerid no SetString.