15.10.2016, 15:41
Hey, i have a problem with my animation system. When a player connect on server, he have to do the 2 times one anim. If he use just one time the command, the server won't play the anim for user... I don't have any ideea how to fix it, maybe you can help me
Sorry for my bad english, Thank you for help.
Code
Example:
Sorry for my bad english, Thank you for help.
Code
Код:
stock OnPlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { if(PlayerInCar(playerid) || JackingEngine[playerid] != 0 || JackingLock[playerid] != 0 || Tazed{playerid} || Beanbag{playerid}) return 1; ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp, 1); OnAnim{playerid} = true; return 1; } return 0; }
Код:
CMD:crossarms(playerid, params[]) { new type; if(sscanf(params,"d",type)) return SyntaxMSG(playerid, "/crossarms [1-2]"); switch(type) { case 1: OnPlayAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); case 2: OnPlayAnim(playerid,"OTB", "wtchrace_loop", 4.0, 1, 0, 0, 0, 0); default: SyntaxMSG(playerid, "/crossarms [1-2]"); } return 1; }