[Pedido]Tutorial sobre /frag
#1

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
Reply
#2

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} ++;
Reply
#3

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...
Reply
#4

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

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

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..
Reply
#6

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

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

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

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.
Reply
#9

Morreu{playerid} ++;
_
Edit.
Reply
#10

@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));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)