[ajuda] Comando /carandiru . -
biaamorin - 14.04.2012
Boa tarde, estou precisando de ajuda com o comado /carandiru [tempo], eu estou tentando a um bom tempo em alterar o comando para
Код:
/carandiru [tempo] [motivo]
Onde colocava o motivo para ser mandando para o Carandiru e apareзesse uma mensagem mais o menos como a de quando й kikado.
Код:
getdate(year, month, day);
{
format(string, sizeof(string), "AdmCmd: %s foi kickado por %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),day,month,year);
KickLog(string);
format(string, sizeof(string), "AdmCmd: %s foi kickado por %s, Motivo: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COR_LIGHTRED, string);
}
Sу que no caso que eu quero seria tipo assim:
"[Info]%s foi colocado no Carandiru, Motivo:%s"
Mais o menos assim.. alguem pode me ajudar?
|Vo disponibilizar o comando de carandiru. Quem poder ja manda o Comando feito? Porfavor. Obrigada
Comando:
Код:
if(strcmp(cmd, "/carandiru",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tempo[20];
new tempo2;
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COR_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, COR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
return 1;
}
if(!strlen(tempo))
{
SendClientMessage(playerid, COR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessage(playerid, COR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
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к Colocou o(a) %s No Carandiru.", giveplayer);
SendClientMessage(playerid, COR_LIGHTRED, string);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
SendClientMessage(giveplayerid, COR_LIGHTRED, "* Vocк foi colocado no Carandiru Pelo Admin Admin_Automбtico.");
}
else
{
format(string, sizeof(string), "* Vocк foi colocado no Carandiru Pelo Admin %s.", sendername);
SendClientMessage(giveplayerid, COR_LIGHTRED, string);
}
GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
ResetPlayerWeaponsEx(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerWantedLevel(giveplayerid, 0);
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
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
}
}
else
{
SendClientMessage(playerid, COR_GREY, " O jogador estб offline !");
return 1;
}
}
return 1;
}
Re: [ajuda] Comando /carandiru . -
BlackCoder - 14.04.2012
dei uma editada no comando aqui na hora , teste ae pra ver se й assim que vocк quer.
pawn Код:
if(strcmp(cmd, "/carandiru",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tempo[20],motivo[40];
new tempo2;
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COR_GREY, " Vocк nгo esta autorizado para usar este comando!");
return 1;
}
tmp = strtok(cmdtext, idx);
tempo = strtok(cmdtext, idx);
motivo = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_GRAD2, "USE: /carandiru [id] [ Tempo ] [ motivo ] ");
return 1;
}
if(!strlen(tempo))
{
SendClientMessage(playerid, COR_GRAD2, "USE: /carandiru [id] [ Tempo ] [ motivo ] ");
return 1;
}
if(!strlen(tempo))
{
SendClientMessage(playerid, COR_GRAD2, "USE: /carandiru [id] [ Tempo ] [ motivo ] ");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessage(playerid, COR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
return 1;
}
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
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к Colocou o(a) %s No Carandiru.", giveplayer);
SendClientMessage(playerid, COR_LIGHTRED, string);
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
SendClientMessage(giveplayerid, COR_LIGHTRED, "* Vocк foi colocado no Carandiru Pelo Admin Admin_Automбtico.");
}
else
{
format(string, sizeof(string), "* Vocк foi colocado no Carandiru Pelo Admin %s.", sendername);
SendClientMessage(giveplayerid, COR_LIGHTRED, string);
}
GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
ResetPlayerWeaponsEx(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerWantedLevel(giveplayerid, 0);
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
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
new msgc[140];
format(msgc,sizeof(msgc),"[INFO] %s foi colocado no Carandiru, Motivo: %s",giveplayer,motivo);
SendClientMessageToAll(COLOR_LIGHTRED,msgc);
}
}
else
{
SendClientMessage(playerid, COR_GREY, " O jogador estб offline !");
return 1;
}
}
return 1;
}