Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Lista de Animaciones

Iniciado por Swarlog, Ene 30, 2023, 04:36 PM

Tema anterior - Siguiente tema

Swarlog

Información Adicional:

Es algo básico pero muy util para empezar desde cero. Se trata de la lista de comandos de algunas animaciones, asi como la ejecución de dicha animacion al utilizar el comando.

Código:

#include <a_samp>

#define COLOR_ORANGE        0xFF9900AA

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/rendirse", true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); return 1; } }
if(strcmp(cmd, "/borracho", true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,1,1,1,1,500); return 1; } }
if(strcmp("/arrestar", cmdtext, true) == 0) { ApplyAnimation( playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1,500); return 1; }
if(strcmp("/reirse", cmdtext, true) == 0) { ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0,0); return 1; }
if(strcmp("/amenazar", cmdtext, true) == 0) { ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 1,500); return 1; }
if(strcmp("/paja", cmdtext, true) == 0) { ApplyAnimation(playerid, "PAULNMAC", "wank_loop", 4.0, 1, 0, 0, 1, 0); return 1; }
if(strcmp("/agredido", cmdtext, true) == 0) { ApplyAnimation(playerid, "POLICE", "crm_drgbst_01", 4.0, 0, 0, 0, 1, 0); return 1; }
if(strcmp("/herido", cmdtext, true) == 0) { ApplyAnimation(playerid, "SWEET", "LaFin_Sweet", 4.0, 0, 1, 1, 1, 0); return 1; }
if(strcmp("/encender", cmdtext, true) == 0) { ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.000000, 0, 0, 1, 1, 0); return 1; }
if(strcmp("/inhalar", cmdtext, true) == 0) { ApplyAnimation(playerid, "SMOKING", "M_smk_drag", 4.000000, 1, 0, 0, 0, -1); return 1; }
if(strcmp("/apagar", cmdtext, true) == 0) { ApplyAnimation(playerid, "SMOKING", "M_smk_out", 4.000000, 0, 1, 1, 0, 0); return 1; }
if(strcmp("/vigilar", cmdtext, true) == 0) { ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 1, 1, 1, 0, 4000); return 1; }
if(strcmp("/recostarse", cmdtext, true) == 0) { ApplyAnimation(playerid,"SUNBATHE", "Lay_Bac_in", 4.0, 0, 0, 0, 1, 0); return 1; }
if(strcmp("/pararse", cmdtext, true) == 0) { ApplyAnimation(playerid,"SUNBATHE", "Lay_Bac_out", 4.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/cubrirse", cmdtext, true) == 0) { ApplyAnimation(playerid, "ped", "cower", 4.0, 1, 0, 0, 0, 0); return 1; }
if(strcmp("/vomitar", cmdtext, true) == 0) { ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/chao", cmdtext, true) == 0) { ApplyAnimation(playerid, "KISSING", "BD_GF_Wave", 3.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/palmada", cmdtext, true) == 0) { ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/agonizar", cmdtext, true) == 0) { ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 0, 0, 0, 1, 0); return 1; }
if(strcmp("/levantarse", cmdtext, true) == 0) { ApplyAnimation(playerid, "ped", "getup_front", 4.000000, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/traficar", cmdtext, true) == 0) { ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/beso", cmdtext, true) == 0) { ApplyAnimation(playerid, "KISSING", "Playa_Kiss_02", 4.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/crack", cmdtext, true) == 0) { ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 0, 0, 0, 1, 0); return 1; }
if(strcmp("/mear", cmdtext, true) == 0) { ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 4.0, 0, 0, 0, 0, 0); return 1; }
if(strcmp("/fumar1", cmdtext, true) == 0) { ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); return 1; }
if(strcmp("/sentarse", cmdtext, true) == 0) { ApplyAnimation(playerid, "SUNBATHE", "ParkSit_M_in", 4.000000, 0, 1, 1, 1, 0); return 1; }
if(strcmp("/pararse", cmdtext, true) == 0) { ApplyAnimation(playerid, "ped", "SEAT_up", 4.000000, 0, 1, 1, 1, 0); return 1; }
if(strcmp("/fokear", cmdtext, true) == 0) { ApplyAnimation( playerid,"ped", "fucku", 4.0, 0, 1, 1, 1, 1 ); return 1; }
if(strcmp("/piquero", cmdtext, true) == 0) { ApplyAnimation(playerid, "DAM_JUMP", "DAM_Launch", 4.0, 0, 1, 1, 1, 1); return 1; }
if(strcmp("/taichi", cmdtext, true) == 0) { ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop",  4.1,7,5,1,1,1); return 1; }
if(strcmp("/beber", cmdtext, true) == 0) { ApplyAnimation(playerid, "BAR", "dnk_stndM_loop", 4.0, 0, 1, 1, 0, 4000); return 1; }
if(strcmp("/boxear", cmdtext, true) == 0) { ApplyAnimation(playerid, "GYMNASIUM", "gym_shadowbox",  4.1,7,5,1,1,1); return 1; }
if(strcmp("/pelea", cmdtext, true) == 0) { ApplyAnimation(playerid, "ped", "FIGHTIDLE", 4.000000, 0, 1, 1, 1, 1); return 1; }
if(strcmp("/recoger", cmdtext, true) == 0) { ApplyAnimation(playerid, "BSKTBALL", "BBALL_pickup", 4.000000, 0, 1, 1, 1, 1); return 1; }
if(strcmp("/botear", cmdtext, true) == 0) { ApplyAnimation(playerid, "BSKTBALL", "BBALL_walk", 4.000000, 1, 1, 1, 1, 500); return 1; }
if(strcmp("/clavarse", cmdtext, true) == 0) { ApplyAnimation(playerid, "BSKTBALL", "BBALL_def_jump_shot", 4.0, 0, 1, 1, 1, 500); return 1; }
if(strcmp("/lanzar", cmdtext, true) == 0) { ApplyAnimation(playerid, "BSKTBALL", "BBALL_Jump_Shot", 4.0, 0, 1, 1, 1, 500); return 1; }
if(strcmp("/rodar", cmdtext, true) == 0) { ApplyAnimation(playerid,"MD_CHASE","MD_HANG_Lnd_Roll",4.1,0,1,1,1,0); return 1; }
if(strcmp("/sanar", cmdtext, true) == 0) { ApplyAnimation(playerid,"MEDIC","CPR",4.1,0,0,0,0,0); return 1; }
if(strcmp("/llorar", cmdtext, true) == 0) { ApplyAnimation(playerid,"GRAVEYARD","mrnF_loop",4.1,0,0,0,0,0); return 1; }
if(strcmp("/dormir", cmdtext, true) == 0) { ApplyAnimation(playerid,"INT_HOUSE","BED_In_R",4.1,0,0,0,1,0); return 1; }
if(strcmp("/detener", cmdtext, true) == 0) { ApplyAnimation(playerid,"POLICE","CopTraf_Stop",4.1,0,0,0,0,0); return 1; }
if(strcmp("/rapear", cmdtext, true) == 0) { ApplyAnimation(playerid,"RAPPING","RAP_B_Loop",4.0,1,0,0,0,8000);  return 1; }
if(strcmp("/patada", cmdtext, true) == 0) { ApplyAnimation(playerid,"FIGHT_C","FightC_2",4.1,7,5,1,1,1); return 1; }
if(strcmp("/fumar2", cmdtext, true) == 0) { ApplyAnimation(playerid,"SMOKING","F_smklean_loop", 4.0, 1, 0, 0, 0, 0); return 1; }
if(strcmp("/fumar3", cmdtext, true) == 0) { ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); return 1; }
if(strcmp("/asustado", cmdtext, true) == 0) { ApplyAnimation(playerid,"PED","handscower",4.1,0,1,1,1,1); return 1; }
if(strcmp("/adolorido", cmdtext, true) == 0) { ApplyAnimation(playerid,"PED","KO_shot_stom",4.1,0,1,1,1,1); return 1; }
if(strcmp("/fuerza", cmdtext, true) == 0) { ApplyAnimation(playerid,"benchpress","gym_bp_celebrate",4.1,0,1,1,1,1); return 1; }
if(strcmp("/hombre", cmdtext, true) == 0) { ApplyAnimation(playerid,"PED","WALK_gang1",4.0,1,1,1,1,500); return 1; }
if(strcmp("/mujer", cmdtext, true) == 0) { ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.0,1,1,1,1,500); return 1; }
if(strcmp("/alsar", cmdtext, true) == 0) { ApplyAnimation(playerid,"GHANDS","gsign2LH",4.1,0,1,1,1,1); return 1; }
if(strcmp("/cansado", cmdtext, true) == 0) { ApplyAnimation(playerid,"PED","WOMAN_runfatold",4.1,7,5,1,1,1); return 1; }
if(strcmp("/superpatada", cmdtext, true) == 0) {  ApplyAnimation(playerid,"FIGHT_C","FightC_3",4.1,0,1,1,1,1); return 1; }
if(!strcmp(cmdtext, "/stop", true)) { ClearAnimations(playerid); return 1; }
if(strcmp("/animaciones",cmdtext,true)==0 || strcmp("/animaciones",cmdtext,true)==0) {
SendClientMessage(playerid,COLOR_ORANGE,"Animaciones disponibles:");
SendClientMessage(playerid,COLOR_ORANGE,"/paja /rendirse /borracho /arrestar /amenazar /superpatada");
SendClientMessage(playerid,COLOR_ORANGE,"/reirse /agredido /herido /encender /inhalar /asustado /adolorido");
SendClientMessage(playerid,COLOR_ORANGE,"/apagar /vigilar /recostarse /pararse /cubrirse /fumar3");
SendClientMessage(playerid,COLOR_ORANGE,"/vomitar /chao /palmada /agonizar /levantarse /fumar1 /rodar");
SendClientMessage(playerid,COLOR_ORANGE,"/traficar /beso /crack /mear /patada /sentarse /fumar2");
SendClientMessage(playerid,COLOR_ORANGE,"/pararse /fokear /piquero /taichi /beber /boxear /fuerza");
SendClientMessage(playerid,COLOR_ORANGE,"/pelea /recojer /botear /clavarse /lanzar /hombre /mujer");
SendClientMessage(playerid,COLOR_ORANGE,"/sanar /llorar /dormir /detener /rapear /strip /alzar /cansado");
SendClientMessage(playerid,COLOR_ORANGE,"/Stop, para detener las animaciones.");
return 1;
}
return 0;
}

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}