if(strcmp(cmd, "/handsup", true) == 0)
{
if(PlayerInfo[playerid][pJailed] == 2)
{
SendClientMessage(playerid, COLOR_GREY, "You cannot do this right now!");
return 1;
}
if(PlayerCuffed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You cannot do this right now!");
return 1;
}
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
if(strcmp(cmd,"/stopani",true) == 0 || strcmp(cmd,"/stopanim",true) == 0)
{
if(IsPlayerConnected(playerid))
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
}
return 1;
}
if(strcmp(cmd, "/dance", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /dance [style 1-4]");
return 1;
}
dancestyle = strval(tmp);
if(dancestyle < 1 || dancestyle > 4) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /dance [style 1-4]");
return 1;
}
if(dancestyle == 1) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
} else if(dancestyle == 2) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
} else if(dancestyle == 3) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
} else if(dancestyle == 4) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
}
return 1;
}
if(strcmp(cmd, "/rap", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /rap [style 1-3]");
return 1;
}
rapstyle = strval(tmp);
if(rapstyle < 1 || rapstyle > 3) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /rap [style 1-3]");
return 1;
}
if(rapstyle == 1) {
ApplyAnimationEx(playerid,"RAPPING","RAP_A_Loop",4.0,1,1,1,1,0);
} else if(rapstyle == 2) {
ApplyAnimationEx(playerid,"RAPPING","RAP_B_Loop",4.0,1,1,1,1,0);
} else if(rapstyle == 3) {
ApplyAnimationEx(playerid,"RAPPING","RAP_C_Loop",4.0,1,1,1,1,0);
}
return 1;
}
if(strcmp(cmd, "/wankoff", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /wankoff [style 1-3]");
return 1;
}
wankstyle = strval(tmp);
if(wankstyle < 1 || wankstyle > 3) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /wankoff [style 1-3]");
return 1;
}
if(wankstyle == 1) {
ApplyAnimationEx(playerid,"PAULNMAC","wank_in",4.0,1,1,1,1,0);
} else if(wankstyle == 2) {
ApplyAnimationEx(playerid,"PAULNMAC","wank_loop",4.0,1,1,1,1,0);
} else if(wankstyle == 3) {
ApplyAnimationEx(playerid,"PAULNMAC","wank_out",4.0,1,1,1,1,0);
}
return 1;
}
if(strcmp(cmd, "/strip", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /strip [style 1-7]");
return 1;
}
stripstyle = strval(tmp);
if(stripstyle < 1 || stripstyle > 7) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /strip [style 1-7]");
return 1;
}
if(stripstyle == 1) {
ApplyAnimationEx(playerid,"STRIP","strip_A",4.0,1,1,1,1,0);
} else if(stripstyle == 2) {
ApplyAnimationEx(playerid,"STRIP","strip_B",4.0,1,1,1,1,0);
} else if(stripstyle == 3) {
ApplyAnimationEx(playerid,"STRIP","strip_C",4.0,1,1,1,1,0);
} else if(stripstyle == 4) {
ApplyAnimationEx(playerid,"STRIP","strip_D",4.0,1,1,1,1,0);
} else if(stripstyle == 5) {
ApplyAnimationEx(playerid,"STRIP","strip_E",4.0,1,1,1,1,0);
} else if(stripstyle == 6) {
ApplyAnimationEx(playerid,"STRIP","strip_F",4.0,1,1,1,1,0);
} else if(stripstyle == 7) {
ApplyAnimationEx(playerid,"STRIP","strip_G",4.0,1,1,1,1,0);
}
return 1;
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE) // do the talkin animation here
public OnPlayerText(playerid, text[])
{
new tmp[128];
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: ID:%d TEXT: %s", sendername, playerid, text);
TextLog(string);
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "[SERVER]: You are not logged in.");
return 0;
}
else if(BenchPresses[playerid] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
return 0;
}
else if(Hospitalized[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
return 0;
}
else if(Mute[playerid] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 0;
}
else if(UsingSpawnBar[playerid] > 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
return 0;
}
Here is onplayerText:
pawn Код:
|
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE) ApplyAnimation(/*whatever is in your code*/);
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE) ClearAnimation(playerid);