22.03.2013, 10:41
Well when ever i type /smoke it only starts an animation, but when ever i type like /smokef or /smokem wich have another animation the same annimation as /smoke comes up, Here is the /smoke
and here is the other smoke commands
as you can see not all of them have the same animation but still i get the same animation whenever i type any of these commands. Also in the /smoke he only makes the animation, nothing else happens. The text dosnt show or anything like that
pawn Код:
if(!strcmp(cmdtext, "/smoke", true)) // By LordMan
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(IsSmoking[playerid] == 0)
{
if(PlayerInfo[playerid][pLighter] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a lighter to light up your cigarette ! ");
return 1;
}
if(PlayerInfo[playerid][pCigarettes] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a cigarette to smoke ! ");
return 1;
}
new randsmoke = random(2)+1;
if(randsmoke == 1)
{
PlayerInfo[playerid][pLighter] -= 1;
PlayerInfo[playerid][pCigarettes] -= 1;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* Stranger takes out his lighter and cigarette and lights it up."); }
else { format(string, sizeof(string), "* Stranger takes out her lighter and cigarette and lights it up."); }
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY)
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
IsSmoking[playerid] = 60;
SendClientMessage(playerid, COLOR_WHITE, "TIP: You will Loose your Cigarrete after 10 Smokes, You can Drop it by Pressing 'F' or 'Enter' !");
SendClientMessage(playerid, COLOR_WHITE, "TIP: You can use /smokeanim if you want to.");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY)
return 1;
}
else
{
PlayerInfo[playerid][pLighter] -= 1;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes out his lighter and cigarette and tries to light it up but fails.", sendername); }
else { format(string, sizeof(string), "* %s takes out her lighter and cigarette and tries to light it up but fails.", sendername); }
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are already smoking ! ");
return 1;
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/smokeanim", true) == 0)
{
if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
switch (cmdtext[7])
{
case '1': LoopingAnim(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); // male
case '2': LoopingAnim(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); //female
case '3': LoopingAnim(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); // standing-fucked
case '4': LoopingAnim(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); // standing
default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
}
return 1;
}
pawn Код:
else if (strcmp("/smokem", cmdtext, true, 4) == 0) {
ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); // Smoke
return 1;
}
else if (strcmp("/smokef", cmdtext, true) == 0) {
ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); // Female Smoking
return 1;
}
pawn Код:
if(!strcmp(cmdtext, "/smokeanim", true)) // By LordMan
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
{
SendClientMessage(playerid, COLOR_GREY, " You can only use /smokeanim while you are at your foot !");
return 1;
}
if(IsSmoking[playerid] != 0)
{
UsingSmokeAnim[playerid] = 1;
ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You need to /smoke to use this animation ! ");
return 1;
}
}
return 1;
}