RaNsiD™
Умник
PHP:
if(strcmp(cmd, "/smoke", true) == 0) {
xxx = strtok(cmdtext, idx);
animationplayed = strval(xxx);
if(animationplayed < 1 || animationplayed > 2)
{
SendClientMessage(playerid,COLOR_ISPOLZUY,"*Используйте /smoke [1-2]");
return 1;
}
if(PlayerInfo[playerid][pSigs] <= 0)
{
SendClientMessage(playerid,COLOR_RED,"** У вас нет сигарет. Вы можете купить их в магазине 24\7.");
return 1;
}
if(animationplayed == 1) {
ApplyAnimation(playerid,"SMOKING", "M_smklean_loop",4.1,1,1,1,1,1);
}else if(animationplayed == 2) {
ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop",4.1,1,1,1,1,1);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
format(string, sizeof(string), "* %s курит.", sendername);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pSigs]--;
return 1;
}
