Pawn kod
if(strcmp(cmd, "/veh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo < 1340)
{
SendClientMessage(playerid, COLOR_GRAD1, "{FF4040}GRESKA:{FFFFFF}Nemozete da ja koristite ovaa komanda.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{FFEA02}KORISTI:{FFFFFF} /veh [ID Vozila] [Boja 1] [Boja 2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}ID vozila ne moze biti manji od 400 ili veci od 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{FFEA02}KORISTI:{FFFFFF} /veh [ID Vozila] [Boja 1] [Boja 2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 255) { SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}ID boje ne moze biti manji od 0 ili veci od 255 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{FFEA02}KORISTI:{FFFFFF} /veh [ID Vozila] [Boja 1] [Boja 2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 255) { SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}ID boje ne moze biti manji od 0 ili veci od 255 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X+2,Y,Z, 0.0, color1, color2, 60000);
CreatedCars = carid;
CreatedCar ++;
Gorivo = 100;
format(string, sizeof(string), "{FF6347}INFO:{FFFFFF}Vozilo %d e stvoreno.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}Server log //
Slike //

