2021-02-06, 01:52 AM
Buenas noches, ten?a la duda de c?mo le puedo agregar una funci?n de animaci?n a un comando, por ejemplo:
Quiero que el comando /robarbanco ejecut? una animaci?n c?mo si se estuviera agachando.
?Qu? tendr?a que hacer para meterle esa funci?n?
usa esto compa
new timeRobo[MAX_PLAYERS];
CMD:robar(playerid)
{
timeRobo[playerid] = SetTimerEx("Robo", 10000, false, "i", playerid);
LoopingAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 1, 1, 1, 1, 13000);
GameTextForPlayer(playerid, "Robando", 10000, 5);
return 1;
}
forward Robo(playerid);
public Robo(playerid)
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 1.0, 0, 0, 0, 0, 0);
RoboRandom(playerid);
return 1;
}
LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
}
stock RoboRandom(playerid)
{
new robo = random(3);
switch(robo)
{
case 0:
{
GivePlayerMoney(playerid, 2000);
SendClientMessage(playerid, -1, "Has ganado {009B00}2000$");
}
case 1:
{
GivePlayerMoney(playerid, 6000);
SendClientMessage(playerid, -1, "Has ganado {009B00}6000$");
}
case 2:
{
GivePlayerMoney(playerid, 9000);
SendClientMessage(playerid, -1, "Has ganado {009B00}9000$");
}
}
return 1;
}
Gracias socio, me vino de maravilla, y ya le a?ad? unas cuantas funciones extras;)
2021-03-07, 06:54 AM
(This post was last modified: 2021-03-07, 06:57 AM by Botato.)
(2021-02-06, 05:45 PM)Nikolay_Staggs Wrote: usa esto compa
new timeRobo[MAX_PLAYERS];
CMD:robar(playerid)
{
? ? timeRobo[playerid] = SetTimerEx("Robo", 10000, false, "i", playerid);
LoopingAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 1, 1, 1, 1, 13000);
GameTextForPlayer(playerid, "Robando", 10000, 5);
return 1;
}
forward Robo(playerid);
public Robo(playerid)
{
? ? ApplyAnimation(playerid, "CARRY", "crry_prtial", 1.0, 0, 0, 0, 0, 0);
? ? RoboRandom(playerid);
? ? return 1;
}
LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
}
stock RoboRandom(playerid)
{
new robo = random(3);
switch(robo)
{
case 0:
{
GivePlayerMoney(playerid, 2000);
SendClientMessage(playerid, -1, "Has ganado {009B00}2000$");
}
case 1:
{
GivePlayerMoney(playerid, 6000);
SendClientMessage(playerid, -1, "Has ganado {009B00}6000$");
}
case 2:
{
GivePlayerMoney(playerid, 9000);
SendClientMessage(playerid, -1, "Has ganado {009B00}9000$");
}
}
return 1;
}
S?lo pidi? un simple comando que ejecute la animaci?n de agachado...
|