YCMD:smoke(playerid, params[],help) { #pragma unused help if(sscanf(params, "s", anims)) { SendClientMessage(playerid, 0x33AA33AA, "Uso correto: /smoke [1-4]"); } else { if(strcmp(anims, "0", true) == 0) { SendClientMessage(playerid, 0x33AA33AA, "Uso correto: /smoke [1-4]"); } if(strcmp(anims, "1", true) == 0) { ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); } if(strcmp(anims, "2", true) == 0) { ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); } if(strcmp(anims, "3", true) == 0) { ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); } if(strcmp(anims, "4", true) == 0) { ApplyAnimation(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); } } return 1; }
YCMD:smoke(playerid, params[],help) { #pragma unused help if(sscanf(params,"s", anims)) return SendClientMessage(playerid, 0x33AA33AA, "Uso correto: /smoke [1-4]"); switch(anims) { case 1: ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); case 2: ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); case 3: ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); case 4: ApplyAnimation(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); } return 1; }
YCMD:smoke(playerid, params[],help)
{
#pragma unused help
if(sscanf(params,"s", anims))
return SendClientMessage(playerid, 0x33AA33AA, "Uso correto: /smoke [1-4]");
switch(anims)
{
case 1: ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
case 2: ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
case 3: ApplyAnimation(playerid, "SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0);
case 4: ApplyAnimation(playerid, "SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0);
}
return 1;
}
YCMD:smoke(playerid, params[]) {
if (isnull(params)) return SendClientMessage(playerid, 0x33AA33AA, "Uso correto: /smoke [1-4]");
switch( strval(params) ) {
case 1: ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
case 2: ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
case 3: ApplyAnimation(playerid, "SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0);
case 4: ApplyAnimation(playerid, "SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0);
default: SendClientMessage(playerid, 0x33AA33AA, "Animaзгo desconhecida!");
}
return true;
}
Код:
YCMD:smoke(playerid, params[],help) { #pragma unused help if(sscanf(params,"s", anims)) return SendClientMessage(playerid, 0x33AA33AA, "Uso correto: /smoke [1-4]"); switch(anims) { case 1: ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); case 2: ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); case 3: ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); case 4: ApplyAnimation(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); } return 1; } |