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;
}
}
}
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;
}
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;
}
CMD:produkti(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not logged in");
if(PlayerInfo[playerid][pJob] != JOB_PRODUKTE && PlayerInfo[playerid][pVIPJob] != JOB_PRODUKTE)
{
//your code
}
if(ProduCar(prodCar))
{
//your code
}
return 1;
}
Try this..
pawn Код:
|
CMD:produkte(playerid, params[])
{
print("1");
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Moras biti logovan da bi koristio ovu komandu.");
print("2");
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}.");
print("3");
if(ProduCar(prodCar)) return SendClientMessage(playerid, COLOR_GREY, "Moras biti u vozilo da bi koristio ovu komandu.");
ProdJob[playerid] = 1;
print("4");
SetPlayerCheckpoint(playerid,Produkti1,11);
print("5");
SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Tvoju Poslu je da dostavis produkte u magacinu.");
print("6");
return 1;
}
CMD:loadprodukte(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, "Ti nisi vozac HotDoga."); new veh; veh = GetPlayerVehicleID(playerid); if(!ProduCar(veh)) return SendClientMessage(playerid, COLOR_GREY, "Moras biti u vozilo da bi koristeo ovu komandu."); ProdJob[playerid] = 1; SetPlayerCheckpoint(playerid,Produkti1,11); SendClientMessage(playerid,COLOR_GREY,"* Pratite crvene markere!"); return 1; }