Detaljan opis problema: ja sam radio vozila na principu ovog tut-a http://balkan-samp.com/forum/index.php?topic=18121.0
Ovaj crveni dio od news mi treba da nije na id auta vec na ovaj tut
Dio skripte:
if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo == 9 || PlayerInfo == 9)
{
if(PlayerInfo == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nemozes pricati,usutkan si");
return 1;
}
new counter = 0;
for(new i = 119; i <= 119; i++)
{
new dist = CheckPlayerDistanceToVehicle(7, playerid, i);
if(dist)
{
counter++;
}
}
if(counter == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You're not near/in your news van/chopper !");
return 1;
}
else
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /news ");
return 1;
}
new rtext;
if(PlayerInfo == 1) { rtext = "Intern Worker"; }
else if(PlayerInfo == 2) { rtext = "Journalist"; }
else if(PlayerInfo == 3) { rtext = "Head Journalist"; }
else if(PlayerInfo == 4) { rtext = "Company Secretary"; }
else if(PlayerInfo == 5) { rtext = "ABC Manager"; }
else if(PlayerInfo == 6) { rtext = "Network Producer"; }
else { rtext = "Intern Worker"; }
format(string, sizeof(string), "[ABC Vijesti] %s %s: %s", rtext, sendername, result);
OOCNews(COLOR_NEWS,string);
PlayerInfo ++;
if(PlayerInfo == 50)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 2, soon you are able to Fly the News Chopper and talk Live."); }
else if(PlayerInfo == 100)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 3, soon you are able to Fly the News Chopper and talk Live."); }
else if(PlayerInfo == 200)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 4, you can fly the News Chopper now."); }
else if(PlayerInfo == 400)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 5, you can now talk Live with any person you want."); }
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nisi novinar !");
}
}//not connected
return 1;
}
Moderator:
Ja neznam sto je toliko tesko staviti "[","]"? Sledeci put stavljaj kode u [ code ][ /code ]!
