[AYUDA]Sistema de admin(comandos)
#1

Hola tengo un problema cuando pongo un comando como me dijeron en mi antiguo post, le agrege el "LVL QE TENIAN QUE SER" pero cuando agrego un comando me saltan 6 errores les muestro los errores y los comandos :S

errores:
Код:
C:\Documents and Settings\MARCE\Escritorio\*\----SERVERS----\pruebas\ladmin4v2.pwn(5947) : error 010: invalid function or declaration
C:\Documents and Settings\MARCE\Escritorio\*\----SERVERS----\pruebas\ladmin4v2.pwn(5948) : error 010: invalid function or declaration
C:\Documents and Settings\MARCE\Escritorio\*\----SERVERS----\pruebas\ladmin4v2.pwn(5951) : error 010: invalid function or declaration
C:\Documents and Settings\MARCE\Escritorio\*\----SERVERS----\pruebas\ladmin4v2.pwn(5954) : error 010: invalid function or declaration
C:\Documents and Settings\MARCE\Escritorio\*\----SERVERS----\pruebas\ladmin4v2.pwn(5955) : error 010: invalid function or declaration
C:\Documents and Settings\MARCE\Escritorio\*\----SERVERS----\pruebas\ladmin4v2.pwn(5958) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
comandos:
Код:
// chaleco & vida
//==============================================================================
	if (strcmp("/vida", cmdtext, true, 10) == 0)
    if(PlayerInfo[playerid][Level] >= 4) {
	SetPlayerHealth(playerid,100);
	SendClientMessage(playerid,red,"Vida recargada");
	return 1;
	}
	
	if (strcmp("/chaleco", cmdtext, true, 10) == 0)
if(PlayerInfo[playerid][Level] >= 4) {
  SetPlayerArmour(playerid,100);
  SendClientMessage(playerid,red,"Armadura Recargada");
  return 1;
  }
//==============================================================================
Probe de todo nada lo soluciona :S espero me ayuden :S
Reply
#2

probe esos comandos y estan bien asegurate que pusiste debajo del callback
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
Reply
#3

pawn Код:
if (strcmp("/vida", cmdtext, true, 10) == 0)
    {
    if(PlayerInfo[playerid][Level] >= 4) {
    SetPlayerHealth(playerid,100);
    SendClientMessage(playerid,red,"Vida recargada");
        }
    return 1;
    }
   
    if (strcmp("/chaleco", cmdtext, true, 10) == 0){
if(PlayerInfo[playerid][Level] >= 4) {
  SetPlayerArmour(playerid,100);
  SendClientMessage(playerid,red,"Armadura Recargada");
  }
  return 1;
  }
Reply
#4

pawn Код:
if (strcmp("/vida", cmdtext, true, 10) == 0)
{
    if(PlayerInfo[playerid][Level] >= 4)
    {
        SetPlayerHealth(playerid,100);
        SendClientMessage(playerid,red,"Vida recargada");
    }
    return 1;
}

if (strcmp("/chaleco", cmdtext, true, 10) == 0)
{
    if(PlayerInfo[playerid][Level] >= 4)
    {
        SetPlayerArmour(playerid,100);
        SendClientMessage(playerid,red,"Armadura Recargada");
    }
    return 1;
}
Dentro de OnPlayerCommandText. Por cierto, si hubieras indentado tu cуdigo, creo que sabrнas donde estбn los problemas.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)