09.10.2013, 15:51
I just can't make it work, everything works fine now at my /mask command but why ApplyAnimation doesn't trigger first time when I write /mask, it trigger only second time+ ... why not first time?
here is the code I've made so far :P
pawn Code:
CMD:mask(playerid)
{
if(Masked[playerid] == 0)
{
Masked[playerid] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.1,0,0,0,0,0);
ShowPlayerNameTagForPlayer(i, playerid, 0);
SetPlayerAttachedObject(playerid, 1, 19037, 2, 0.104000, 0.028000, 0.001000, 83.700035, 89.199966, 1.000000,1.000000,1.000000,1.000000,0,0);
//AttachObjectToPlayer(Mask, playerid, 0.104000, 0.028000, 0.001000, 83.700035, 89.199966, 1.000000);
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You put your Mask on!");
return 1;
}
else if(Masked[playerid] == 1)
{
Masked[playerid] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You took your Mask off!");
return 1;
}
return 1;
}