Započeo Vaka
•14. Feb. 2015.• Zaključano[ Pomoc ] - Respawn problem !
426
pregleda
15
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
111
Postovi:
29
Teme:
Pridružio se:Jul 2013
14. Feb. 2015.
Skripta koju koristim: UP
Detaljan opis problema: Pa ovako, prebacio sam u dialog sekunde za kolko moze da se postavi /rac eh sad kad kliknem na 10 sekundi pise ono da sam pokrenuo respawn i sve to i nece da se respawn za 10 sec opet kucam /rac pise respawn vec pokrenut valjda sam ja zeznuo nesto oko timera sta boga pitaj ..
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Detaljan opis problema: Pa ovako, prebacio sam u dialog sekunde za kolko moze da se postavi /rac eh sad kad kliknem na 10 sekundi pise ono da sam pokrenuo respawn i sve to i nece da se respawn za 10 sec opet kucam /rac pise respawn vec pokrenut valjda sam ja zeznuo nesto oko timera sta boga pitaj ..
Dio skripte:
YCMD:rac(playerid, params[], help)
{
#pragma unused help
if(UlogovanProvera == 0) return SCM(playerid,-1,""GLAVNA""BELA": Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo < 2) return SCM(playerid, -1, ""GLAVNA" "BELA": Samo Admini (AL 2+)!");
if(AdminDuty == 0) return SCM(playerid,-1,""GLAVNA""BELA": Morate biti Admin/Pomocnik na duznosti !");
if(RespawnVozila) return SCM(playerid, -1, ""GLAVNA""BELA": Respawn je vec pokrenut!");
{
ShowPlayerDialog(playerid, 626, DIALOG_STYLE_LIST, "* RESPAWN *", "10 sekundi\n20 sekundi\n30 sekundi \n40 sekundi\n50 sekundi\n60 sekundi", "Izaberi", "IZLAZ");
return 1;
}
}if(dialogid == 626)//respawn
{
if(response)
{
if(listitem == 0)//10 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 10sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn1", 10000, false);
}
if(listitem == 1)//20 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 20sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn2", 20000, false);
}
if(listitem == 2)//30 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 30sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn3", 30000, false);
}
if(listitem == 3)//40 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 40sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn4", 40000, false);
}
if(listitem == 4)//50 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 50sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn5", 50000, false);
}
if(listitem == 5)//60 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 60sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn6", 60000, false);
}
}
return 1;
}SetTimer("Respawn1", 10000, false);//10 sekundi
SetTimer("Respawn2", 20000, false);//20 sekundi
SetTimer("Respawn3", 30000, false);//30 sekundi
SetTimer("Respawn4", 40000, false);//40 sekundi
SetTimer("Respawn5", 50000, false);//50 sekundi
SetTimer("Respawn6", 60000, false);//60 sekundiNeke slike/video za lakse dobivanje pomoci(neobavezno)://
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
601
Postovi:
93
Teme:
Pridružio se:Sep. 2013
14. Feb. 2015.
Moras da imas Public kao na primer
forward RespawnVozila(playerid);
public RespawnVozila(playerid)
{
new string;
format(string, sizeof(string), "((OOC)) Vozila su respawnovana.");
BroadCast(COLOR_BLUE,string);
new bool:unwanted;
foreach (Player, i)
{
if(IsPlayerInAnyVehicle(i)) { unwanted[GetPlayerVehicleID(i)]=true; }
}
for(new car = 0; car <= 1500; car++)
{
if(!unwanted) SetVehicleToRespawn(car);
}
return 1;
}
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
111
Postovi:
29
Teme:
Pridružio se:Jul 2013
14. Feb. 2015.
Imam brate mozda je u publicu greska?
forward Respawn();
public Respawn()
{
new bool:unwanted;
for(new player=0; player {
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car < MAX_VOZILA; car++)
{
if(!unwanted) SetVehicleToRespawn(car);
}
RespawnVozila = 0; SendClientMessageToAll(-1, ""GLAVNA"[ Respawn ]"BELA": Respawn Vozila je uspjesno odradjen !");
return 1;
}Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
7 / 250 XP
Početnik(0)
535
Postovi:
50
Teme:
Pridružio se:Nov. 2013
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
111
Postovi:
29
Teme:
Pridružio se:Jul 2013
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
15. Feb. 2015.
forward Respawn(playerid);
public Respawn(playerid)
{
new bool:unwanted;
foreach (new i : Player)
{
if (IsPlayerInAnyVehicle(i)) { unwanted[GetPlayerVehicleID(i)] = true; }
}
for(new car = 0; car <= MAX_VEHICLES; car++)
{
if(!unwanted) SetVehicleToRespawn(car);
}
return 1;
}
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
23 / 250 XP
Početnik(2)
3,748
Postovi:
73
Teme:
Pridružio se:Jan. 2012
15. Feb. 2015.
Ako ovako radis
u svakom responsu na zadani timer moras imati response za respawn.
SetTimer("Respawn1", 10000, false);//10 sekundi
SetTimer("Respawn2", 20000, false);//20 sekundi
SetTimer("Respawn3", 30000, false);//30 sekundi
SetTimer("Respawn4", 40000, false);//40 sekundi
SetTimer("Respawn5", 50000, false);//50 sekundi
SetTimer("Respawn6", 60000, false);//60 sekundiu svakom responsu na zadani timer moras imati response za respawn.
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
111
Postovi:
29
Teme:
Pridružio se:Jul 2013
15. Feb. 2015.
Mislis ovo ne moze da bude ovako , mora da bude odvojeno za svakog po jednu? 😄
if(dialogid == 626)//respawn
{
if(response)
{
if(listitem == 0)//10 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 10sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn1", 10000, false);
}
if(listitem == 1)//20 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 20sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn2", 20000, false);
}
if(listitem == 2)//30 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 30sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn3", 30000, false);
}
if(listitem == 3)//40 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 40sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn4", 40000, false);
}
if(listitem == 4)//50 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 50sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn5", 50000, false);
}
if(listitem == 5)//60 sekundi
{
new string; RespawnVozila = 1;
format(string,sizeof string, ""GLAVNA"[ Respawn ]"BELA": Admin "GLAVNA"%s"BELA" , je pokrenuo respawn za 60sec udjite u vase vozilo !", GetName(playerid));
SendClientMessageToAll(-1, string);
SetTimer("Respawn6", 60000, false);
}
}
return 1;
}Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava