Započeo Ante_Street
•13. Jun 2011.[Pomoc]/duty
1,058
pregleda
8
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
13. Jun 2011.
Skripta koju koristim: LARP
Detaljan opis problema: Definira sam point na kojem se uzima duty,al problem je u tome sto se moze uzet na cijelom serveru....nezz u cemu je problem
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Detaljan opis problema: Definira sam point na kojem se uzima duty,al problem je u tome sto se moze uzet na cijelom serveru....nezz u cemu je problem
Dio skripte:
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 1 || PlayerInfo == 1 || PlayerInfo == 2 || PlayerInfo == 2 || PlayerInfo == 3 || PlayerInfo == 3)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerToPoint(3,playerid,-2455.2380,503.9444,30.0781) ||PlayerInfo != 255)
{
if(OnDuty==0)
{
format(string, sizeof(string), "* Cuvar zakona %s je uzeo znacku i oruzje iz ormarica.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
OnDuty = 1;
}
else if(OnDuty==1)
{
format(string, sizeof(string), "* Cuvar zakona %s je stavio znacku i oruzje u ormaric.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 5, 0);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Nisi u sobi sa ormaricima !");
return 1;
}
}
else if(PlayerInfo == 4||PlayerInfo == 4)
{
if(JobDuty == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vise nisi na duznosti sa poslom bolnicara i vise neces primati pozive.");
JobDuty = 0;
Medics -= 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Sad si na duznosti sa poslom bolnicara i primat ces pozive od ozlijedenih ljudi.");
JobDuty = 1;
Medics += 1;
}
}
}
return 1;
} Neke slike/video za lakse dobivanje pomoci(neobavezno):
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
13. Jun 2011.
Quote from June 13, 2011, 8:56 pm:
koristi IsPlayerInRangeOfPoint
Nece...ako nemos nac u cem je problem de mi svoj ak nebude radio ni on onda neznam di je problem
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
13. Jun 2011.
Evo ovako :
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 1 || PlayerInfo == 1 || PlayerInfo == 2 || PlayerInfo == 2 || PlayerInfo == 3 || PlayerInfo == 3)
{
if (IsPlayerInRangeOfPoint(3, playerid,255.3,77.4,1003.6) || IsPlayerInRangeOfPoint(3,playerid,-1616.1294,681.1594,7.1875) || IsPlayerInRangeOfPoint(3,playerid,-2455.2380,503.9444,30.0781) ||PlayerInfo != 255)
{
if(OnDuty==0)
{
format(string, sizeof(string), "* Cuvar zakona %s je uzeo znacku i oruzje iz ormarica.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
OnDuty = 1;
}
else if(OnDuty==1)
{
format(string, sizeof(string), "* Cuvar zakona %s je stavio znacku i oruzje u ormaric.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 5, 0);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Nisi u sobi sa ormaricima !");
return 1;
}
}
else if(PlayerInfo == 4||PlayerInfo == 4)
{
if(JobDuty == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vise nisi na duznosti sa poslom bolnicara i vise neces primati pozive.");
JobDuty = 0;
Medics -= 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Sad si na duznosti sa poslom bolnicara i primat ces pozive od ozlijedenih ljudi.");
JobDuty = 1;
Medics += 1;
}
}
}
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
13. Jun 2011.
Quote from June 13, 2011, 9:43 pm:
Evo ovako :
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 1 || PlayerInfo == 1 || PlayerInfo == 2 || PlayerInfo == 2 || PlayerInfo == 3 || PlayerInfo == 3)
{
if (IsPlayerInRangeOfPoint(3, playerid,255.3,77.4,1003.6) || IsPlayerInRangeOfPoint(3,playerid,-1616.1294,681.1594,7.1875) || IsPlayerInRangeOfPoint(3,playerid,-2455.2380,503.9444,30.0781) ||PlayerInfo != 255)
{
if(OnDuty==0)
{
format(string, sizeof(string), "* Cuvar zakona %s je uzeo znacku i oruzje iz ormarica.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
OnDuty = 1;
}
else if(OnDuty==1)
{
format(string, sizeof(string), "* Cuvar zakona %s je stavio znacku i oruzje u ormaric.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 5, 0);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Nisi u sobi sa ormaricima !");
return 1;
}
}
else if(PlayerInfo == 4||PlayerInfo == 4)
{
if(JobDuty == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vise nisi na duznosti sa poslom bolnicara i vise neces primati pozive.");
JobDuty = 0;
Medics -= 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Sad si na duznosti sa poslom bolnicara i primat ces pozive od ozlijedenih ljudi.");
JobDuty = 1;
Medics += 1;
}
}
}
return 1;
}
probao sam neradi.......odnosno radi ali po cijelom serveru,a ne kod lokera u pd kako bi ja htjeo
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,504
Postovi:
88
Teme:
Pridružio se:Sep. 2010
14. Jun 2011.
L84S Sta ti baljezgas?Pa ne idu parametrui u IsPlayerInRangeOfPoint kao u PlayerToPoint
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 1 || PlayerInfo == 1 || PlayerInfo == 2 || PlayerInfo == 2 || PlayerInfo == 3 || PlayerInfo == 3)
{
if (IsPlayerInRangeOfPoint(playerid, 3, 255.3, 77.4, 1003.6) || IsPlayerInRangeOfPoint(playerid, 3, -1616.1294, 681.1594, 7.1875) || IsPlayerInRangeOfPoint(playerid, 3, -2455.2380, 503.9444, 30.0781) ||PlayerInfo != 255)
{
if(OnDuty==0)
{
format(string, sizeof(string), "* Cuvar zakona %s je uzeo znacku i oruzje iz ormarica.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
OnDuty = 1;
}
else if(OnDuty==1)
{
format(string, sizeof(string), "* Cuvar zakona %s je stavio znacku i oruzje u ormaric.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 5, 0);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Nisi u sobi sa ormaricima !");
return 1;
}
}
else if(PlayerInfo == 4||PlayerInfo == 4)
{
if(JobDuty == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vise nisi na duznosti sa poslom bolnicara i vise neces primati pozive.");
JobDuty = 0;
Medics -= 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Sad si na duznosti sa poslom bolnicara i primat ces pozive od ozlijedenih ljudi.");
JobDuty = 1;
Medics += 1;
}
}
}
return 1;
}
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 1 || PlayerInfo == 1 || PlayerInfo == 2 || PlayerInfo == 2 || PlayerInfo == 3 || PlayerInfo == 3)
{
if (IsPlayerInRangeOfPoint(playerid, 3, 255.3, 77.4, 1003.6) || IsPlayerInRangeOfPoint(playerid, 3, -1616.1294, 681.1594, 7.1875) || IsPlayerInRangeOfPoint(playerid, 3, -2455.2380, 503.9444, 30.0781) ||PlayerInfo != 255)
{
if(OnDuty==0)
{
format(string, sizeof(string), "* Cuvar zakona %s je uzeo znacku i oruzje iz ormarica.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
OnDuty = 1;
}
else if(OnDuty==1)
{
format(string, sizeof(string), "* Cuvar zakona %s je stavio znacku i oruzje u ormaric.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
GivePlayerWeapon(playerid, 23, 150);
GivePlayerWeapon(playerid, 5, 0);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Nisi u sobi sa ormaricima !");
return 1;
}
}
else if(PlayerInfo == 4||PlayerInfo == 4)
{
if(JobDuty == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vise nisi na duznosti sa poslom bolnicara i vise neces primati pozive.");
JobDuty = 0;
Medics -= 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Sad si na duznosti sa poslom bolnicara i primat ces pozive od ozlijedenih ljudi.");
JobDuty = 1;
Medics += 1;
}
}
}
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
Wheel Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
35
Postovi:
3
Teme:
Pridružio se:Jan. 2011
14. Jun 2011.
Izbrisi ovaj dio iz if uslova (što sam boldirao):
if (IsPlayerInRangeOfPoint(playerid, 3, 255.3, 77.4, 1003.6) || IsPlayerInRangeOfPoint(playerid, 3, -1616.1294, 681.1594, 7.1875) || IsPlayerInRangeOfPoint(playerid, 3, -2455.2380, 503.9444, 30.0781) ||PlayerInfo != 255)
if (IsPlayerInRangeOfPoint(playerid, 3, 255.3, 77.4, 1003.6) || IsPlayerInRangeOfPoint(playerid, 3, -1616.1294, 681.1594, 7.1875) || IsPlayerInRangeOfPoint(playerid, 3, -2455.2380, 503.9444, 30.0781) ||PlayerInfo != 255)
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava