//[ADMIN]______________________________________________________________________________
//-----------------------------------[JAIL]-------------------------------------------------------------------------
if(strcmp(cmd, "/prison",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_GREY, " you are not authorized to use this command !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /prison [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You placed %s in Fort DeMorgan.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* You were placed in Fort DeMorgan by Admin %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~w~Welcome to ~n~~r~Fort DeMorgan", 5000, 3);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = 3600;
SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
SetPlayerInterior(giveplayerid,0);
PlayerInfo[giveplayerid][pInt] = 0;
format(string, 256, "AdmCmd: %s a sido jaileado por %s.", giveplayer, sendername);
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s esta en Gravitacional Jail por %s", giveplayer, sendername);
printf("%s",string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/unprison",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_GREY, " you are not authorized to use this command!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unprison [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You unprisoned %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* You have been unprisoned by Admin %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pJailTime] = 0;
PlayerInfo[giveplayerid][pJailed] = 0;
SetPlayerWorldBounds(giveplayerid, 20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerPos(giveplayerid, 93.4852,1920.6235,18.0450);
format(string, 256, "AdmCmd: %s has been unprisoned by Admin %s.", giveplayer, sendername);
BroadCast(COLOR_LIGHTRED,string);
format(string, 256, "[ADMIN] %s has been un-prisoned by Admin %s.", giveplayer, sendername);
ABroadCast(COLOR_YELLOW,string,1);
}
}
}
return 1;
}
if(strcmp(cmd, "/ajail", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 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, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
format(string, sizeof(string), "* You Jailed %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* You were Jailed by Admin %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
format(string, sizeof(string), "You are jailed for %d minutes. Bail: Unable", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s has been jailed by Admin %s [Reason: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s has been Admin-jailed by %s [Reason: %s]", giveplayer, sendername, (result));
printf("%s",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
Originally Posted by Carlos_Martinez
yo quiero cambiar de lugar una faccion jeje
|