Započeo Ante_Street
•28. Jun 2011.[Pomoc]/news
1,544
pregleda
12
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
28. Jun 2011.
Skripta koju koristim: LARP
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:
Moderator:
Ja neznam sto je toliko tesko staviti "[","]"? Sledeci put stavljaj kode u [ code ][ /code ]!
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 ]!
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
28. Jun 2011.
FireMan wrote on June 28, 2011, 10:42 am:
Kako su ti definirana vozila od CNN.
new cnnauto;
forward IsAcnnauto(carid);
public IsAcnnauto(carid)
{
for(new i = 0; i < sizeof(cnnauto); i++)
{
if(carid == cnnauto) return 1;
}
return 0;
}
Eto tako sam definira
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
421
Postovi:
35
Teme:
Pridružio se:Maj 2011
28. Jun 2011.
imas li sada kod vozila
krenes od 0 pa povecas za 1 kako dodajes novo vozilo
cnnauto = Addstatic....krenes od 0 pa povecas za 1 kako dodajes novo vozilo
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
28. Jun 2011.
Quote from June 28, 2011, 9:04 pm:
imas li sada kod vozila
krenes od 0 pa povecas za 1 kako dodajes novo vozilo
cnnauto = Addstatic....krenes od 0 pa povecas za 1 kako dodajes novo vozilo
Ja tebe nista nekontam pitao sam za /news komandu ne izradu vozila za org/bande(bez id-a)
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
502
Postovi:
82
Teme:
Pridružio se:Mar. 2011
29. Jun 2011.
if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo == 9 || PlayerInfo == 9)
{
if(PlayerInfo == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(IsAcnnauto(newcar))
{
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_GREY, "Koristi: /news ");
return 1;
}
new rtext;
if(PlayerInfo == 1) { rtext = "Mladi Novinar"; }
else if(PlayerInfo == 2) { rtext = "Novinar"; }
else if(PlayerInfo == 3) { rtext = "Reporter"; }
else if(PlayerInfo == 4) { rtext = "Stariji Novinar"; }
else if(PlayerInfo == 5) { rtext = "Urednik"; }
else if(PlayerInfo == 6) { rtext = "Glavni Urednik"; }
else { rtext = "Intern Worker"; }
format(string, sizeof(string), "Vijesti | %s %s |: %s", rtext, sendername, result);
OOCNews(COLOR_ORANGE,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, " You are not a News Reporter !");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nisi u vozilu CNN-a");
}
}//not connected
return 1;
}
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
29. Jun 2011.
Eror:error 029: invalid expression, assumed zero
Warning:warning 204: symbol is assigned a value that is never used: "playa"
Warning:warning 204: symbol is assigned a value that is never used: "playa"
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
2,079
Postovi:
24
Teme:
Pridružio se:Feb. 2011
29. Jun 2011.
Ante_Street wrote on June 29, 2011, 9:50 am:
Eror:error 029: invalid expression, assumed zero
Warning:warning 204: symbol is assigned a value that is never used: "playa"
Warning:warning 204: symbol is assigned a value that is never used: "playa"
ta vrijednost nije uopce koristena ili je moras negdje koristiti ili delete.
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
1. Jul 2011.
Evo cijela komanda izbacuje na linijama oznacenim crvenom bojom....
if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo == 9 || PlayerInfo == 9)
{
if(PlayerInfo == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(IsAcnnauto(newcar))
{
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_GREY, "Koristi: /news ");
return 1;
}
new rtext;
if(PlayerInfo == 1) { rtext = "Mladi Novinar"; }
else if(PlayerInfo == 2) { rtext = "Novinar"; }
else if(PlayerInfo == 3) { rtext = "Reporter"; }
else if(PlayerInfo == 4) { rtext = "Stariji Novinar"; }
else if(PlayerInfo == 5) { rtext = "Urednik"; }
else if(PlayerInfo == 6) { rtext = "Glavni Urednik"; }
else { rtext = "Intern Worker"; }
format(string, sizeof(string), "Vijesti | %s %s |: %s", rtext, sendername, result);
OOCNews(COLOR_ORANGE,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, " You are not a News Reporter !");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nisi u vozilu CNN-a");
}
}//not connected
return 1;
}
if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo == 9 || PlayerInfo == 9)
{
if(PlayerInfo == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(IsAcnnauto(newcar))
{
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_GREY, "Koristi: /news ");
return 1;
}
new rtext;
if(PlayerInfo == 1) { rtext = "Mladi Novinar"; }
else if(PlayerInfo == 2) { rtext = "Novinar"; }
else if(PlayerInfo == 3) { rtext = "Reporter"; }
else if(PlayerInfo == 4) { rtext = "Stariji Novinar"; }
else if(PlayerInfo == 5) { rtext = "Urednik"; }
else if(PlayerInfo == 6) { rtext = "Glavni Urednik"; }
else { rtext = "Intern Worker"; }
format(string, sizeof(string), "Vijesti | %s %s |: %s", rtext, sendername, result);
OOCNews(COLOR_ORANGE,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, " You are not a News Reporter !");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nisi u vozilu CNN-a");
}
}//not connected
return 1;
}
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
2,079
Postovi:
24
Teme:
Pridružio se:Feb. 2011
1. Jul 2011.
if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo == 9 || PlayerInfo == 9)
{
if(PlayerInfo == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
if(IsAcnnauto(newcar))
{
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_GREY, "Koristi: /news ");
return 1;
}
new rtext;
if(PlayerInfo == 1) { rtext = "Mladi Novinar"; }
else if(PlayerInfo == 2) { rtext = "Novinar"; }
else if(PlayerInfo == 3) { rtext = "Reporter"; }
else if(PlayerInfo == 4) { rtext = "Stariji Novinar"; }
else if(PlayerInfo == 5) { rtext = "Urednik"; }
else if(PlayerInfo == 6) { rtext = "Glavni Urednik"; }
else { rtext = "Intern Worker"; }
format(string, sizeof(string), "Vijesti | %s %s |: %s", rtext, sendername, result);
OOCNews(COLOR_ORANGE,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, " You are not a News Reporter !");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nisi u vozilu CNN-a");
}
}//not connected
return 1;
}Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava