What's the problem in this CMD?
#1

I convert an some cmd into zcmd.

This is old (also i add implented other way to work)

pawn Код:
if(strcmp(cmd, "/produkte", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pJob] != 30)
            {
                SendClientMessage(playerid, COLOR_WHITE,"[{FFD200}INFO:{FAFAFA}] Ti nisi vozac za {00B9FF}Produkte{FAFAFA}.");
                return 1;
            }
            if(PlayerToPoint(30.0,playerid,2417.39990234,-2475.00000000,13.89999962) || PlayerToPoint(25.0,playerid,2412.39990234,-2460.19995117,13.69999981))
            {
                SendClientMessage(playerid, COLOR_WHITE,"[{FFD200}INFO:{FAFAFA}] Nisi na mesto za {00B9FF}Poslu{FAFAFA}.");
                return 1;
            }
            new prodkola = GetPlayerVehicleID(playerid);
            if(IsAProdCar(prodkola))
             {
            SetPlayerCheckpoint(playerid, Ribados1, 3.0);
            SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Tvoju Poslu je da dostavis produkte u magacinu.");
            return 1;
        }
    }
  }
The converted looks like this, but whats the problem because the first think when i try /produkti say "Unkown command"

Converted To this:

pawn Код:
CMD:produkte(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Moras biti logovan da bi koristio ovu komandu.");
    if(PlayerInfo[playerid][pJob] != JOB_PRODUKTE && PlayerInfo[playerid][pVIPJob] != JOB_PRODUKTE) return SendClientMessage(playerid, COLOR_GREY, "{FAFAFA}[{FFD200}INFO:{FAFAFA}] Ti nisi vozac za {00B9FF}Produkte{FAFAFA}.");
    if(ProduCar(prodCar))  return SendClientMessage(playerid, COLOR_GREY, "Moras biti u vozilo da bi koristio ovu komandu.");
    ProdJob[playerid] = 1;
    SetPlayerCheckpoint(playerid,Produkti1,11);
    SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Tvoju Poslu je da dostavis produkte u magacinu.");
    return 1;
}
I convert then like this, but i get same. The other cmd looks like this for other job it work but this one not work?

pawn Код:
CMD:produkti(playerid, params[])
{
    if(IsPlayerLoggedIn(playerid))
        {
           if(PlayerInfo[playerid][pJob] != JOB_PRODUKTE && PlayerInfo[playerid][pVIPJob] != JOB_PRODUKTE)
            {
                SendClientMessage(playerid, COLOR_WHITE,"[{FFD200}INFO:{FAFAFA}] Ti nisi vozac za {00B9FF}Petrol{FAFAFA}.");
                return 1;
            }
            if(ProduCar(prodCar))
            {
            ProdJob[playerid] = 1;
            SetPlayerCheckpoint(playerid,Produkti1,11);
            SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Tvoju Poslu je da dostavis produkte u magacinu.");
          }
      }
     return 1;
  }
Reply


Messages In This Thread
What's the problem in this CMD? - by GBLTeam - 24.12.2013, 19:48
Re: What's the problem in this CMD? - by Zamora - 24.12.2013, 20:10
Re: What's the problem in this CMD? - by GBLTeam - 25.12.2013, 17:56
Re: What's the problem in this CMD? - by Jstylezzz - 25.12.2013, 17:59
Re: What's the problem in this CMD? - by GBLTeam - 25.12.2013, 19:24

Forum Jump:


Users browsing this thread: 4 Guest(s)