Sziasztok
Mért van az ha Valakit berakok Adminjailba akkor nekem változtatja meg az interiotom õ meg zuhan a levegõbe? :O:S
itt a parancs
if(strcmp(cmd, \"/ajail\", true) == 0 || strcmp(cmd, \"/aj\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, \"HASZNÁLAT: /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_GRAD2, \"HASZNÁLAT: /ajail [JátékosID/NévRészlet] [mp] [indok]\");
return 1;
}
format(string, sizeof(string), \"Börtönbe 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;
SetPlayerInterior(playerid, 10);
PlayerInfo[playa][pInt] = 0;
PlayerInfo[playa][Ajail] = 1;
randomaj = random(sizeof(RandomAdminJailSpawn));
SetPlayerPos(playa, RandomAdminJailSpawn[randomaj][0], RandomAdminJailSpawn[randomaj][1], RandomAdminJailSpawn[randomaj][2]);
//SetPlayerPos(playa, -228.75657653809,976.13928222656,22.283348083496);
format(string, sizeof(string), \"%s bezárt a börtönbe %d másodpercre, INDOK: %s\",sendername,PlayerInfo[playa][pJailTime] = money,result);
SendClientMessage(playa, 0x33CCFFAA, string);
format(string, 256, \"<< %s adminjailbe zárta %s, INDOK: %s, Idõtartam: %d mp >>\", 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] %s adminjailbe zárta %s, INDOK: %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 INDOK: %s\", giveplayer, sendername, (result));
printf(\"%s\",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \"Nem vagy admin!\");
}
}
return 1;
}