24.12.2013, 19:48
I convert an some cmd into zcmd.
This is old (also i add implented other way to work)
The converted looks like this, but whats the problem because the first think when i try /produkti say "Unkown command"
Converted To this:
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?
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;
}
}
}
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;
}
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;
}