[Ajuda] Erro zcmd
#1

C:\Users\Caio\Desktop\Universo dos Caminhoneiros [GM]\UDC\pawno\include\zcmd.inc(37) : error 055: start of function body without function header
C:\Users\Caio\Desktop\Universo dos Caminhoneiros [GM]\UDC\pawno\include\zcmd.inc(3 : error 010: invalid function or declaration
C:\Users\Caio\Desktop\Universo dos Caminhoneiros [GM]\UDC\pawno\include\zcmd.inc(41) : error 010: invalid function or declaration
C:\Users\Caio\Desktop\Universo dos Caminhoneiros [GM]\UDC\pawno\include\zcmd.inc(43) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Cуdigo do que eu editei no zcmd.

PHP код:
forward OnPlayerCommandReceived(playeridcmdtext[]); 
forward OnPlayerCommandPerformed(playeridcmdtext[], success); 
{
if(!
success)
{
SendClientMessage(playerid0xFF0000FF"Esse omando nгo existe use /comandos.");
return 
0;
}
return 
1;

Reply
#2

Deve ficar assim em seu gamemode/filterscript.
pawn Код:
public OnPlayerCommandReceived( playerid,  cmdtext[])
{
    return printf( "OnPlayerCommandReceived( %i, %s )" , playerid , cmdtext ),1;
}

public OnPlayerCommandPerformed( playerid,  cmdtext[], success)
{
    if ( success )
        return printf( "OnPlayerCommandPerformed( %i, %s, %i )" , playerid , cmdtext , success ),1;
    else
        return  SendClientMessage( playerid , -1, "[ERRO]: Vocк digitou o Comando Errado "),
                printf( "OnPlayerCommandPerformed( %i, %s, %i )" , playerid , cmdtext , success ),1;
}

Nгo й necessбrio encaminhar essas callbacks com forward.
Reply
#3

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessageEx(playerid,-1, ">> Este Comando Nгo Existe, /comandos para mais informaзoes");
    return 1;
}
Serнa Isto?
Reply
#4

Quote:
Originally Posted by Adejair
Посмотреть сообщение
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
        return SendClientMessageEx(playerid,-1, ">> Este Comando Nгo Existe, /comandos para mais informaзoes");
    return 1;
}
Serнa Isto?
Agora sim, mas lembre que para nгo executar o comando deve retornar algum valor. !
Reply
#5

schooc onde coloco isso?
Reply
#6

Quote:
Originally Posted by Nork
Посмотреть сообщение
schooc onde coloco isso?
Quote:
Originally Posted by Schocc
Посмотреть сообщение
Deve ficar assim em seu gamemode/filterscript.
......

Estou fazendo um mini tutorial explicando.
Reply
#7

ppc trucking kra
Reply
#8

ahh consegui
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)