if(strcmp(cmd, "/cadeia",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tempo[20];
new tempo2;
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo esta autorizado ultilizar este comando.");
return 1;
}
tmp = strtok(cmdtext, idx);
tempo = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo]");
return 1;
}
if(!strlen(tempo))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб Trabalhando.");
return 1;
}
giveplayerid = ReturnUser(tmp);
tempo2 = strval(tempo);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк prendeu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
if(admtrampando[playerid] == 1)
{
format(string, sizeof(string), "* Vocк foi preso Pelo Admin %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
}
GameTextForPlayer(giveplayerid, "~b~", 5000, 3);
ResetPlayerWeaponsEx(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerWantedLevel(giveplayerid, 0);
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
SetPlayerPos(giveplayerid, -221.059051,1408.984008,27.773437);
SetPlayerInterior(playerid, 18);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O jogador estб offline !");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/cadeia", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Uso correto: /cadeia [ id ] [tempo em minutos] [motivo].");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
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, "Uso correto: /cadeia [ id ] [tempo em minutos] [motivo].");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "ADM CMD: %s foi preso por %d minutos pelo admnistrador: %s, motivo: %s.", pNome(playa),money,pNome(playerid),result);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "Vocк foi preso por %d minutos pelo admnistrador: %s, motivo: %s.", money,pNome(playerid),result);
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
NathanInfo[playa][pAdmin] = 1;
NathanInfo[playa][pAdminTempo] = money*60;
SetPlayerInterior(playa, 5);
SetPlayerPos(playa, 322.72,306.4,999.11);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/cadeia", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [ id ] [time(minutes)] [Motivo]");
return 1;
}
new target;
target = ReturnUser(tmp);
new playa;
new time;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
time = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] < 2 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1350)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
return 1;
}
new offset = idx;
new result[64];
new length = strlen(cmdtext);
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, "USE: /cadeia [Id Do Jogador] [motivo]");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Voce foi preso %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Voce foi preso pelo Admin %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 2;
PlayerInfo[playa][pJailTime] = time*60;
SetPlayerInterior(playa, 0);
SetPlayerPos(playa, 107.2300,1920.6311,18.5208);
SetPlayerWorldBounds(playa, 337.5694,101.5826,1940.9759,1798.7453);
format(string, 256, "Admin: %s ID(%d) Prendeu %s ID(%d) Por %d Minutos. Motivo: %s",sendername, playerid, giveplayer,target, time, (result));
SendClientMessageToAll(COLOR_LIGHTRED/*0x63C3F6AA*/, string);
format(string, sizeof(string), "Voce foi preso por %d Minutos em Praзa Publica. Motivo: %s", time, (result));
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/cadeia",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tempo[20];
new tempo2;
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo esta autorizado ultilizar este comando.");
return 1;
}
tmp = strtok(cmdtext, idx);
tempo = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo]");
return 1;
}
if(!strlen(tempo))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo]");
return 1;
}
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб Trabalhando.");
return 1;
}
giveplayerid = ReturnUser(tmp);
tempo2 = strval(tempo);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк prendeu %s.[Motivo: %s]", giveplayer, result);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
if(admtrampando[playerid] == 1)
{
format(string, sizeof(string), "* Vocк foi preso Pelo Admin %s.[Motivo: %s]", sendername, result);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
}
GameTextForPlayer(giveplayerid, "~b~", 5000, 3);
ResetPlayerWeaponsEx(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerWantedLevel(giveplayerid, 0);
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
SetPlayerPos(giveplayerid, -221.059051,1408.984008,27.773437);
SetPlayerInterior(playerid, 18);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O jogador estб offline !");
return 1;
}
}
return 1;
}
|
Nenhum deu certo, o 2є aparece que nгo esta trabalhando e o 1є da Erros
@EDIT Corrigi deu certo vlw o 2є '-' |