[Ajuda] Comando: /Tapa
#1

Tб dando uns erros no comando /tapa que fiz aqui e coloquei no gamemode.

Comando:
pawn Код:
CMD:tapa(playerid, params[])
{
    new name[MAX_PLAYER_NAME], ID, string[120];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1,"[ERRO] Voce nao e admin ou nao tem level suficiente.");
    if(sscanf(params, "u", ID)) return SendClientMessage(playerid,-1,"[USE] /tapa [id]");
    if(!IsPlayerConnected(ID))
    new Float:c[3];
    GetPlayerPos(ID,c[0],c[1],c[2]);
    SetPlayerPos(ID,c[0],c[1],c[2]+15);
    GetPlayerName(ID, name, sizeof(name));
    format(string, sizeof(string), "[NomeSV]: %s deu um tapa em %s.", name);
    SendClientMessageToAll(Cor_Roxo, string);
    return 1;
}
Erros:
pawn Код:
C:\Users\Gabriel\Desktop\samp03esvr_win32\gamemodes\DMB.pwn(1225) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Gabriel\Desktop\samp03esvr_win32\gamemodes\DMB.pwn(1225) : warning 221: label name "Float" shadows tag name
C:\Users\Gabriel\Desktop\samp03esvr_win32\gamemodes\DMB.pwn(1225) : error 017: undefined symbol "c"
C:\Users\Gabriel\Desktop\samp03esvr_win32\gamemodes\DMB.pwn(1225) : warning 215: expression has no effect
C:\Users\Gabriel\Desktop\samp03esvr_win32\gamemodes\DMB.pwn(1225) : error 001: expected token: ";", but found "]"
C:\Users\Gabriel\Desktop\samp03esvr_win32\gamemodes\DMB.pwn(1225) : fatal error 107: too many error messages on one line
@edit

E a linha que dб erro й aqui.
pawn Код:
new Float:c[3];
Reply
#2

pawn Код:
CMD:tapa(playerid, params[])
{
    new name[MAX_PLAYER_NAME], ID, string[120];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1,"[ERRO] Voce nao e admin ou nao tem level suficiente.");
    if(sscanf(params, "u", ID)) return SendClientMessage(playerid,-1,"[USE] /tapa [id]");
    if(!IsPlayerConnected(ID)) return 1;
    new Float:c[3];
    GetPlayerPos(ID,c[0],c[1],c[2]);
    SetPlayerPos(ID,c[0],c[1],c[2]+15);
    GetPlayerName(ID, name, sizeof(name));
    format(string, sizeof(string), "[NomeSV]: %s deu um tapa em %s.", name);
    SendClientMessageToAll(Cor_Roxo, string);
    return 1;
}
Reply
#3

Obrigado pedro miranda.
Reply
#4

Caso eu queira colocar pra /supertapa sу й aumentar o +15 nй?

pawn Код:
SetPlayerPos(ID,c[0],c[1],c[2]+15);
Reply
#5

Sim.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)