Detaljan opis problema: Ukucam /veh spawna se vozilo sjednem u njega pise da je unisteno
Dio skripte:
Quote
if(strcmp(cmd, "/veh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo < 4)
{
SendClientMessage(playerid, COLOR_RED, " Niste ovlasteni za koristenje ove komande!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /veh ");
return 1;
}
new car;
car = strvalEx(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Broj auta nemoze ici ispod 400 ili iznad 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /veh ");
return 1;
}
new color1;
color1 = strvalEx(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Broj boje nemoze ici ispod 0 ili iznad 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /veh ");
return 1;
}
new color2;
color2 = strvalEx(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Broj boje nemoze ici ispod 0 ili iznad 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y+4,Z+10, 0.0, color1, color2, 60000);
CreatedCars = carid;
CreatedCar ++;
format(string, sizeof(string), " Vozilo %d spawnano.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo < 4)
{
SendClientMessage(playerid, COLOR_RED, " Niste ovlasteni za koristenje ove komande!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /veh ");
return 1;
}
new car;
car = strvalEx(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Broj auta nemoze ici ispod 400 ili iznad 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /veh ");
return 1;
}
new color1;
color1 = strvalEx(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Broj boje nemoze ici ispod 0 ili iznad 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /veh ");
return 1;
}
new color2;
color2 = strvalEx(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Broj boje nemoze ici ispod 0 ili iznad 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y+4,Z+10, 0.0, color1, color2, 60000);
CreatedCars = carid;
CreatedCar ++;
format(string, sizeof(string), " Vozilo %d spawnano.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
