/FakeCmd e /FakeKill -
dinhocap - 15.04.2013
Alguйm poderia me ajudar para criar 2 comandos, /fakecmd e /fakekill
O /fakecmd й para fazer algum player digitar tal comando.
O /fakekill й para aparecer no chatkill que tal player matou tal player com tal arma.
Tipo assim...
/fakekill [id do player que mata] [id do player morto] [ e a arma]
Alguйm poderia fazer para mim? Ou me falar como cria e tal? Obrigado.
Meus comandos sгo assim...
Ex:
CMD:fakekill...
Re: /FakeCmd e /FakeKill -
Juniiro3 - 15.04.2013
Uma base:
pawn Код:
COMMAND:fakekill(playerid, params[])
{
new KillerID, VictimID, reason;
if (sscanf(params, "uu", KillerID, VictimID)) SendClientMessage(playerid, 0xFF0000AA, "Uso: /fakekill [id do player que mata] [id do player morto] []");
else
{
SetPlayerHealth(VictimID, 0.0); //Mata o player que e morto
SendDeathMessage(KillerID, VictimID, reason); //Coloca que o player morreu no chat-kill
}
}
OBS: Nгo testado
OBS IMPORTANTIIIIIIIIIISSIMA: Necessinta plugin sscanf, by ******
Re: /FakeCmd e /FakeKill -
dinhocap - 18.04.2013
nem funciona isso D:
Re: /FakeCmd e /FakeKill -
Gii - 18.04.2013
pawn Код:
CMD: fakekill (playerid, params[] ) {
new
PlayerID,
IDDeath,
Weapon
;
if ( sscanf (params, "uui", PlayerID, IDDeath, Weapon ) )
return SendClientMessage(playerid, -1, "/Use: [id do player que mata] [id do player morto] [ e a arma] ");
SendDeathMessage(PlayerID, IDDeath, Weapon);
return true;
}
CMD: fakecmd ( playerid, params[] ) {
new
PlayerID,
CMD[10]
;
if ( sscanf (params, "us[10]", PlayerID, CMD ) )
return SendClientMessage(playerid, -1, "Use: /fakecmd [Player ID] [CMD] ");
CommandText(PlayerID, CMD);
return true;
}
Re: /FakeCmd e /FakeKill -
dinhocap - 20.04.2013
Quote:
Originally Posted by iCasTiel
pawn Код:
CMD: fakekill (playerid, params[] ) {
new PlayerID, IDDeath, Weapon ;
if ( sscanf (params, "uui", PlayerID, IDDeath, Weapon ) ) return SendClientMessage(playerid, -1, "/Use: [id do player que mata] [id do player morto] [ e a arma] "); SendDeathMessage(PlayerID, IDDeath, Weapon);
return true;
}
CMD: fakecmd ( playerid, params[] ) {
new PlayerID, CMD[10] ;
if ( sscanf (params, "us[10]", PlayerID, CMD ) ) return SendClientMessage(playerid, -1, "Use: /fakecmd [Player ID] [CMD] "); CommandText(PlayerID, CMD);
return true; }
|
error 017: undefined symbol "CommandText"
O /fakekill deu certinho, mais o /fakecmd ta dando erro D:
Re: /FakeCmd e /FakeKill -
Gii - 20.04.2013
pawn Код:
CMD: fakecmd ( playerid, params[] ) {
new
PlayerID,
CMD[10]
;
if ( sscanf (params, "us[10]", PlayerID, CMD ) )
return SendClientMessage(playerid, -1, "Use: /fakecmd [Player ID] [CMD] ");
CallRemoteFunction("OnPlayerCommandText", "ds", PlayerID, CMD);
return true;
}
Re: /FakeCmd e /FakeKill -
dinhocap - 20.04.2013
Cara vlw mesmo, deu certinho os 2 comandos
Muito obrigado +rep