if(strcmp(cmd, \"/ajail\", true) == 0 || strcmp(cmd, \"/aj\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"{0285FF}HASZNÁLAT:{FFFFFF} /ajail [JátékosID/NévRészlet] [mp] [indok]\");
return 1;
}
new playa;
new money;
new randomaj;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (Admin(playerid, 1) || PlayerInfo[playerid][orokas] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"{0285FF}HASZNÁLAT:{FFFFFF} /ajail [JátékosID/NévRészlet] [mp] [indok]\");
return 1;
}
format(string, sizeof(string), \"AdminJail-be zártad %s.\", rag(giveplayer,3));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
PlayerInfo[playa][pInt] = 0;
PlayerInfo[playa][Ajail] = 1;
randomaj = random(sizeof(RandomAdminJailSpawn));
SetPlayerPos(playa, RandomAdminJailSpawn[randomaj][0], RandomAdminJailSpawn[randomaj][1], RandomAdminJailSpawn[randomaj][2]);
SetPlayerInterior(playa,10);
//SetPlayerPos(playa, -228.75657653809,976.13928222656,22.283348083496);
format(string, sizeof(string), \"%s AdminJailt kapott %s által | Oka: %s | Időtartam: %d mp\",rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = money);
SendClientMessageToAll(0xFF0606FF, string);
format(string, sizeof(string), \"%s AdminJailt kapott %s által. | Oka: %s\",rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = money);
ABroadCast(COLOR_ADMIN,string,1);
new nev[32];
GetPlayerName(playerid, nev, sizeof(nev));
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d][Adminjail] %s adminjailt kapott %s által | Oka: %s, Időtartam: %d mp \",y,m,d,h,mi,s,rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = money);
LoOoG(stringx);
format(string, sizeof(string), \"%s AdminJail-be került %s által Oka: %s\", giveplayer, sendername, (result));
printf(\"%s\",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \"Nem vagy admin/adminsegéd!\");
}
}
return 1;
}
if(strcmp(cmd, \"/percajail\", true) == 0 || strcmp(cmd, \"/percaj\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"{0285FF}HASZNÁLAT:{FFFFFF} /percajail [JátékosID/NévRészlet] [perc] [indok]\");
return 1;
}
new playa;
new percaj;
new randomaj;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
percaj = strval(tmp);
if (Admin(playerid, 1) || PlayerInfo[playerid][orokas] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"{0285FF}HASZNÁLAT:{FFFFFF} /percajail [JátékosID/NévRészlet] [perc] [indok]\");
return 1;
}
format(string, sizeof(string), \"AdminJail-be zártad %s.\", rag(giveplayer,3));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = percaj;
PlayerInfo[playa][pInt] = 0;
PlayerInfo[playa][Ajail] = 1;
randomaj = random(sizeof(RandomAdminJailSpawn));
SetPlayerPos(playa, RandomAdminJailSpawn[randomaj][0], RandomAdminJailSpawn[randomaj][1], RandomAdminJailSpawn[randomaj][2]);
SetPlayerInterior(playa,10);
//SetPlayerPos(playa, -228.75657653809,976.13928222656,22.283348083496);
format(string, sizeof(string), \"%s AdminJailt kapott %s által | Oka: %s | Időtartam: %d perc\",rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = percaj);
SendClientMessageToAll(0xFF0606FF, string);
format(string, sizeof(string), \"%s AdminJailt kapott %s által. | Oka: %s\",rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = percaj);
ABroadCast(COLOR_ADMIN,string,1);
new nev[32];
GetPlayerName(playerid, nev, sizeof(nev));
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d][Adminjail] %s adminjailt kapott %s által | Oka: %s, Időtartam: %d perc \",y,m,d,h,mi,s,rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = percaj);
LoOoG(stringx);
format(string, sizeof(string), \"%s AdminJail-be került %s által Oka: %s\", giveplayer, sendername, (result));
printf(\"%s\",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \"Nem vagy admin/adminsegéd!\");
}
}
return 1;
}
if(strcmp(cmd, \"/percajail\", true) == 0 || strcmp(cmd, \"/percaj\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"{0285FF}HASZNÁLAT:{FFFFFF} /percajail [JátékosID/NévRészlet] [perc] [indok]\");
return 1;
}
new playa;
new percaj;
new randomaj;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
percaj = strval(tmp);
if (Admin(playerid, 1) || PlayerInfo[playerid][orokas] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"{0285FF}HASZNÁLAT:{FFFFFF} /percajail [JátékosID/NévRészlet] [perc] [indok]\");
return 1;
}
format(string, sizeof(string), \"AdminJail-be zártad %s.\", rag(giveplayer,3));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = percaj*3600;
PlayerInfo[playa][pInt] = 0;
PlayerInfo[playa][Ajail] = 1;
randomaj = random(sizeof(RandomAdminJailSpawn));
SetPlayerPos(playa, RandomAdminJailSpawn[randomaj][0], RandomAdminJailSpawn[randomaj][1], RandomAdminJailSpawn[randomaj][2]);
SetPlayerInterior(playa,10);
//SetPlayerPos(playa, -228.75657653809,976.13928222656,22.283348083496);
format(string, sizeof(string), \"%s AdminJailt kapott %s által | Oka: %s | Időtartam: %d perc\",rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = percaj);
SendClientMessageToAll(0xFF0606FF, string);
format(string, sizeof(string), \"%s AdminJailt kapott %s által. | Oka: %s\",rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = percaj);
ABroadCast(COLOR_ADMIN,string,1);
new nev[32];
GetPlayerName(playerid, nev, sizeof(nev));
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d][Adminjail] %s adminjailt kapott %s által | Oka: %s, Időtartam: %d perc \",y,m,d,h,mi,s,rag(giveplayer,3), sendername, (result),PlayerInfo[playa][pJailTime] = percaj);
LoOoG(stringx);
format(string, sizeof(string), \"%s AdminJail-be került %s által Oka: %s\", giveplayer, sendername, (result));
printf(\"%s\",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \"Nem vagy admin/adminsegéd!\");
}
}
return 1;
}