[Problem]ZCMD
#1

Hi, I have a question, I have my command in ZCMD facts, the problem is that I use takes the line that I have to determine that the command was wrong, yet it works.

Any solution?


Example of detected wrong command
In other commands not give me problem
PHP код:
//___________________________________________________
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
successSendClientMessage(playeridCOLOR_WHITE"{FF0000}Error:{FFFFFF} El comando no fue procesado.{00FF22} /ayuda");
    else if(
gPlayerLogged[playerid] == 0) { SendClientMessage(playeridCOLOR_GREY"Usted no esta logeado aъn."); }
    return 
1;

Command:
PHP код:
CMD:creardrogas(playeridparams[])
{
    if(
Equipo_Narcotraficantes(playerid))
    {
        if(
IsPlayerInRangeOfPoint(playerid1.0, -1072.81,-1631.91,76.36) || IsPlayerInRangeOfPoint(playerid1.0, -1062.18,-1632.44,76.36))
        {
            
PlayerInfo[playerid][pDrugs]++;
            
SendClientMessage(playeridCOLOR_GRAD2"ЎFelicidades!. Usted ha creado algunas drogas");
        }
        else
           
SendClientMessage(playeridCOLOR_GRAD2"[ERROR] Usted no esta en el punto para crear drogas.");
    }
    else
       
SendClientMessage(playeridCOLOR_GRAD2"[ERROR] Usted no es un Narcotraficante!.");
 } 
Thanks!
Reply
#2

Te faltу retornar a 1.
pawn Код:
CMD:creardrogas(playerid, params[])
{
    if(Equipo_Narcotraficantes(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, -1072.81,-1631.91,76.36) || IsPlayerInRangeOfPoint(playerid, 1.0, -1062.18,-1632.44,76.36))
        {
            PlayerInfo[playerid][pDrugs]++;
            SendClientMessage(playerid, COLOR_GRAD2, "ЎFelicidades!. Usted ha creado algunas drogas");
        }
        else
           SendClientMessage(playerid, COLOR_GRAD2, "[ERROR] Usted no esta en el punto para crear drogas.");
    }
    else
       SendClientMessage(playerid, COLOR_GRAD2, "[ERROR] Usted no es un Narcotraficante!.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)