Eu digito /ajustar id 1 dai fala O Tempo nгo pode ser menor que 1 nem maior que 20, mais eu ponhei 2 e n dava poderiam me ajudar.
pawn Код:
if(strcmp(cmd, "/ajustar", true) == 0)
{
new id[128], stemp[128];
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
if(OnDuty[playerid] != 1) return SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
if(!PlayerToPoint(12.0, playerid, 1529.5420,-1677.7013,5.8906) && !PlayerToPoint(12.0, playerid, 324.3320,-1496.5543,24.9219) && !PlayerToPoint(12.0, playerid, -59.5696,-224.3779,5.4297) && !PlayerToPoint(12.0, playerid, 852.7890,-1275.1908,14.3865) && !PlayerToPoint(12.0, playerid, 190.5879,178.8082,1003.0234) && !PlayerToPoint(12.0, playerid, 321.4930,312.3641,999.1484) && !PlayerToPoint(12.0, playerid, 267.5573,81.8416,1001.0391)
&& !PlayerToPoint(12.0, playerid, -1299.3954,490.6682,11.1953))
{// Jail spot
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo estб perto da cela, nгo pode ajustar o tempo do suspeito !");
return true;
}
stemp = strtok(cmdtext, idx);
id = strtok(cmdtext, idx);
if(!strlen(id) || !strlen(stemp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /ajustar [id] [tempo (minutos)]");
giveplayerid = ReturnUser(id);
new time = strval(stemp);
if(time < 1 || time > 20) { SendClientMessage(playerid, COLOR_GREY, " O Tempo nгo pode ser menor que 1 nem maior que 20 !"); return true; }
new suspect = giveplayerid;
if(IsPlayerConnected(suspect))
{
format(string, sizeof(string), "* Vocк ajustou %s !", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[suspect][pJailTime] = time * 60;
format(string, sizeof(string), "Oficial %s ajustou seu tempo de prisгo para %d Segundos.", PlayerName(playerid),PlayerInfo[suspect][pJailTime]);
SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um Oficial !");
return true;
}
}
return true;
}
pawn Код:
if(strcmp(cmd, "/ajustar",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tempo[20];
new tempo2;
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo esta autorizado para usar 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;
}
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к Ajustou o(a) %s Na Cadeia.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Vocк foi ajustado por %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~b~Ajustado com ~n~~r~~Le Sucess", 5000, 3);
PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O jogador estб offline !");
return 1;
}
}
return 1;
}