SA-MP Forums Archive
[Pedido]Tutorial sobre /frag - 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: [Pedido]Tutorial sobre /frag (/showthread.php?tid=338957)



[Pedido]Tutorial sobre /frag - Luciano* - 01.05.2012

Olб, eu gostaria de saber se alguem com boa vontade fizesse um tutorial sobre o comando /frag. explicando certinho o que cada linha faz etc.



Uploaded with ImageShack.us


Re: [Pedido]Tutorial sobre /frag - zSuYaNw - 01.05.2012

pawn Код:
// TOP:
new
    Morreu[MAX_PLAYERS char],
    Matou[MAX_PLAYERS char]
;

if(!strcmp(cmdtext,"/frag", true))
{
    new
        string[128],
        Nome[24]
    ;

    GetPlayerName(playerid, Nome, 24);

    format(string, sizeof(string),"(/Frag)[Status]: %s |  Matou: %d | Morreu: %d | Score: %d", Nome, Matou{playerid}, Morreu{playerid}, GetPlayerScore(playerid));
    SendClientMessageToAll(playerid, -1, string);
    return true;
}



// OnPlayerDeath
Morre{playerid) ++;
Matou{killerid} ++;



Re: [Pedido]Tutorial sobre /frag - Gustavo_z - 01.05.2012

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
pawn Код:
// TOP:
new
    Morreu[MAX_PLAYERS char],
    Matou[MAX_PLAYERS char]
;

if(!strcmp(cmdtext,"/frag", true))
{
    new
        string[128],
        Nome[24]
    ;

    GetPlayerName(playerid, Nome, 24);

    format(string, sizeof(string),"(/Frag)[Status]: %s |  Matou: %d | Morreu: %d | Score: %d", Nome, Matou{playerid}, Morreu{playerid}, GetPlayerScore(playerid));
    SendClientMessageToAll(playerid, -1, string);
    return true;
}



// OnPlayerDeath
Morre{playerid) ++;
Matou{killerid} ++;
E a parte do Dominou, X1 Ganhos e X1 Perdidos?
Tbm estou precisando...


Re: [Pedido]Tutorial sobre /frag - Joker_OutLock - 01.05.2012

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
pawn Код:
SendClientMessageToAll(playerid, -1, string);
vocк estб fazendo isso errado...

o certo й:
pawn Код:
SendClientMessageToAll(-1, string);



Re: [Pedido]Tutorial sobre /frag - zSuYaNw - 01.05.2012

Quote:
Originally Posted by Gustavo_z
Посмотреть сообщение
E a parte do Dominou, X1 Ganhos e X1 Perdidos?
Tbm estou precisando...
Cara, para min poder fazer essas partes tambйm,
terei que analisar seu comando/funзгo "dominar".
e x1, como voces nгo mandaram..


Re: [Pedido]Tutorial sobre /frag - Panico622 - 01.05.2012

Quote:
Originally Posted by Joker_OutLock
Посмотреть сообщение
vocк estб fazendo isso errado...

o certo й:
pawn Код:
SendClientMessageToAll(-1, string);
verdadi


Re: [Pedido]Tutorial sobre /frag - zSuYaNw - 01.05.2012

Quote:
Originally Posted by Panico622
Посмотреть сообщение
verdadi
Sim, eu estava com pressa, tenho que trabalhar ainda hoje


Respuesta: [Pedido]Tutorial sobre /frag - Luciano* - 01.05.2012

Deu 4 erros nessa linha:

pawn Код:
Morre{playerid) ++;
Erros:
pawn Код:
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(922) : error 017: undefined symbol "Morre"
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(922) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(922) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(922) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(922) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: [Pedido]Tutorial sobre /frag - _Jizzy_ - 01.05.2012

Morreu{playerid} ++;
_
Edit.


Respuesta: [Pedido]Tutorial sobre /frag - Luciano* - 01.05.2012

@Edit--

Fiz igual ao seu e deu esses aqui:

pawn Код:
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(1191) : error 001: expected token: "-identifier-", but found "new"
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(1192) : error 017: undefined symbol "Nome"
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(1193) : error 017: undefined symbol "Nome"
Linha:

pawn Код:
new Nome[24];
    GetPlayerName(playerid, Nome, 24);
    format(string, sizeof(string),"(/Frag)[Status]: %s |  Matou: %d | Morreu: %d | Score: %d", Nome, Matou{playerid}, Morreu{playerid}, GetPlayerScore(playerid));