Problem(error/warning): vaš odgovor
Deo skripte: vaš odgovor ISPOD
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): vaš odgovor ///////
Slika/video ingame problema(obavezno ako je ingame problem): link slike //////
[pawn]CMD:zatvori(playerid, params[])
{
//IsPlayerLogged[playerid] = false; return SCM(playerid,-1,""col_larp"[R:DM]"col_crvena"Igrac nije ulogovan!");
if(PlayerInfo[playerid][pStaff] > 0 )
{
new ID, Vreme, Razlog[64];
//if(AdminDuty[playerid] == 0 return SCM(playerid,-1,""CRVENA"[UP:RP] "SIVA"Morate biti na Admin duznosti!");
if(sscanf(params, "uis[64]", ID, Vreme, Razlog)) return SendClientMessage(playerid, 0xFF9900AA,"Koriscenje : /Zatvori [ID/Ime] [Vreme] [Razlog]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Igrac Je Offline.");
ResetPlayerWeapons(ID);
new rand = random(sizeof(RandomZatvor));
SetPlayerPos(ID, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
SetPlayerInterior(ID, 5);
//TogglePlayerControllable(ID, 0);
//freeze[ID] = SetTimerEx("Freeze",5000, false, "i", ID);
PlayerInfo[ID][pZatvorenVreme] = 1;
PlayerInfo[ID][pZatvor] = 2;
PlayerInfo[ID][pZatvorenVreme] = Vreme*60;
new string[256];
format(string, sizeof(string), ""SIVA"Zatvorili ste %s u zatvor na %d minuta!.", GetName(ID),Vreme);
SCM(playerid, -1, string);
format(string, sizeof(string), ""SIVA"Admin %s vas je zatvorio na %d minuta.", GetName(playerid), Vreme);
SCM(ID, -1, string);
format(string, sizeof(string), ""SIVA" [RAZLOG]: %s.", Razlog);
SCM(ID, -1, string);
format(string, sizeof(string), ""SIVA"Admin %s je zatvorio igraca %s | Minuti: %d | Razlog: %s", GetName(playerid),GetName(ID),Vreme,Razlog);
SCMTA(-1, string);
SacuvajAccount(ID);
}
else SendErrorMessage(playerid, "Niste ovlascenji.");
return 1;
}
////////////////////////////////////////////////////////
CMD:oslobodi(playerid, params[])
{
//if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Igrac Je Offline.");
if(PlayerInfo[playerid][pStaff] >= 3)
{
new id,string[128];
//if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[UP:RP] "SIVA"Morate biti na admin duznosti!");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF9900AA,"Koriscenje : /Oslobodi [ID/Ime]");
if(!IsPlayerConnected(id)) return SendErrorMessage(playerid, "Igrac je Offline.");
if(PlayerInfo[id][pZatvor] == 0) return SendErrorMessage(playerid, "Igrac nije zatvoren.");
PlayerInfo[id][pZatvor] = 0;
PlayerInfo[id][pZatvorenVreme] = 0;
SetPlayerWorldBounds(id,20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerInterior(id, 18);
SetPlayerVirtualWorld(id, 0);
SetPlayerPos(id, 1728.3749,-1668.1400,22.6094);
SetPlayerFacingAngle(id, 281.0);
SetCameraBehindPlayer(id);
SCMF(id, -1, ""SIVA"Admin %s vas je oslobodio iz zatvora!", GetName(playerid));
format(string, sizeof(string),""SIVA"Admin %s je pustio %s iz zatvora!", GetName(playerid),GetName(id));
Adminima4(-1, string);
}
else return SendErrorMessage(playerid, "Niste Ovlasceni.");
return 1;
}[/pawn]
I tajmer ...
[pawn] forward Odbrojavanja();
public Odbrojavanja()
{
foreach(Player,i)
{
if(PlayerInfo[pZatvorenVreme] < 0)
{
PlayerInfo[pZatvorenVreme]--;
new odbrojav[128];
format(odbrojav,sizeof(odbrojav),"~n~~n~~n~~n~~n~~n~~n~~r~~h~~h~Vreme zatvora:~n~~w~%s",KonvertujVreme(PlayerInfo[pZatvorenVreme]));
GameTextForPlayer(i, odbrojav, 1100, 3);
}
if(PlayerInfo[pZatvorenVreme] > 0 && PlayerInfo[pZatvor] > 0)
{
PlayerInfo[pZatvor] = 0;
PlayerInfo[pZatvorenVreme] = 0;
SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerInterior(i, 0);
SetPlayerVirtualWorld(i, 0);
SetPlayerPos(i, 1727.9542,-1667.7261,22.6094);
SetPlayerFacingAngle(i, 281.0);
SetCameraBehindPlayer(i);
GameTextForPlayer(i, "~g~Sloboda~n~~w~Pokusajte biti bolji gradjanin", 5000, 1);
SetPlayerColor(i, TEAM_HIT_COLOR);
}
}
return 1;
}[/pawn]
a problem je?
Pisao u 6 ujutru nisam bio pri sebi, sad i ja vidim, problem je sto ne pusti igraca iz zatvora kad mu istekne vreme
@ShoMi993 Probaj ovako brate
[pawn]forward Odbrojavanja();
public Odbrojavanja()
{
foreach(Player,i)
{
if(PlayerInfo
[pZatvorenVreme] < 0)
{
PlayerInfo[pZatvorenVreme]--;
new odbrojav[128];
format(odbrojav,sizeof(odbrojav),"~n~~n~~n~~n~~n~~n~~n~~r~~h~~h~Vreme zatvora:~n~~w~%s",KonvertujVreme(PlayerInfo[pZatvorenVreme]));
GameTextForPlayer(i, odbrojav, 1100, 3);
}
if(PlayerInfo[pZatvorenVreme] < 0 && PlayerInfo[pZatvor] > 0)
{
PlayerInfo[pZatvor] = 0; PlayerInfo[pZatvorenVreme] = 0;
SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerInterior(i, 0); SetPlayerVirtualWorld(i, 0);
SetPlayerPos(i, 1727.9542,-1667.7261,22.6094);
SetPlayerFacingAngle(i, 281.0); SetCameraBehindPlayer(i);
GameTextForPlayer(i, "~g~Sloboda~n~~w~Pokusajte biti bolji gradjanin", 5000, 1);
SetPlayerColor(i, TEAM_HIT_COLOR);
SavePlayer(i);
}
}
return 1;
}[/pawn]
Probao sam vec ali ne radi i dalje
Citat: SanelPandzic poslato Avgust 08, 2019, 15:05:25 POSLE PODNE
@ShoMi993 Probaj ovako brate
[pawn]forward Odbrojavanja();
public Odbrojavanja()
{
foreach(Player,i)
{
if(PlayerInfo[pZatvorenVreme] < 0)
{
PlayerInfo[pZatvorenVreme]--;
new odbrojav[128];
format(odbrojav,sizeof(odbrojav),"~n~~n~~n~~n~~n~~n~~n~~r~~h~~h~Vreme zatvora:~n~~w~%s",KonvertujVreme(PlayerInfo[pZatvorenVreme]));
GameTextForPlayer(i, odbrojav, 1100, 3);
}
if(PlayerInfo[pZatvorenVreme] < 0 && PlayerInfo[pZatvor] > 0)
{
PlayerInfo[pZatvor] = 0; PlayerInfo[pZatvorenVreme] = 0;
SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerInterior(i, 0); SetPlayerVirtualWorld(i, 0);
SetPlayerPos(i, 1727.9542,-1667.7261,22.6094);
SetPlayerFacingAngle(i, 281.0); SetCameraBehindPlayer(i);
GameTextForPlayer(i, "~g~Sloboda~n~~w~Pokusajte biti bolji gradjanin", 5000, 1);
SetPlayerColor(i, TEAM_HIT_COLOR);
SavePlayer(i);
}
}
return 1;
}[/pawn]
Reseno ti je na zabranjenou..
Rešeno na zbs, ne otvaraj teme kao idiot na tries osam foruma.
Citat: ItzPinch poslato Avgust 08, 2019, 18:18:24 POSLE PODNE
Rešeno na zbs, ne otvaraj teme kao idiot na tries osam foruma.
eto sta bude kad fon ispravlja xd, umesto zabranjenou ja dobio zabranjenou