SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 21/01/2010, 06:05 PM   #1
dioguitosbr
Little Clucker
 
Join Date: Nov 2009
Posts: 9
Reputation: 0
Default [ANIMATION]The animation does not work

Hello everyone!
I'm doing my RPG but found another mistake!
By the time the player enters sleep near the bed he lies down and continues normal (ie, the animation does not apply)
Code:
Code:
  if(strcmp(cmd,"/dormir", true) == 0)  
  {  
    PreloadAnimLib(playerid,"BEACH");
    if(jogador[dentrodecasa][playerid]) {    
      if(!jogador[dormindo][playerid]) {      
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -681.7235,439.7814,3280.6643)) {
          SetPlayerPos(playerid, -681.7235,439.7814,3280.6643);
          SendClientMessage(playerid, cor_verde, "Agora vocÍ esta dormindo!"); 
          Dormir(playerid, 1);
        } else SendClientMessage(playerid, cor_vermelho,"VocÍ esta longe da cama");
      } else SendClientMessage(playerid, cor_vermelho, "VocÍ ja esta dormindo");
    }
    return 1;
  }

stock Dormir(playerid, tipo)
{
  PreloadAnimLib(playerid,"BEACH");
  new temp;
  switch(tipo) {
    case 1: {
      temp = 4 * 30000;// 2 Minutos        
    }    
    case 2: {    
      temp = 4 * 60000;// 4 Minutos            
    }    
  }
  LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 1, 1, 1, temp);
  SetTimerEx("PDormir", temp, false, "d", playerid)
  jogador[dormindo][playerid] = true; 
  return 1;
}

public PDormir(playerid)
{
  ClearAnimations(playerid);  
  jogador[sono][playerid] = 0;
  jogador[dormindo][playerid] = false;  
  SendClientMessage(playerid, cor_azul, "VocÍ ja dormiu! VocÍ esta sem sono agora!");
  return 1;
}

stock LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
  ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
}

stock PreloadAnimLib(playerid, animlib[])
{
	ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
And he rarely throws.

Sorry for my bad English, I used the ****** translator
dioguitosbr is offline  
Old 21/01/2010, 10:59 PM   #2
dioguitosbr
Little Clucker
 
Join Date: Nov 2009
Posts: 9
Reputation: 0
Default Re: [ANIMATION]The animation does not work

Up!
dioguitosbr is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No Animation xinix000 Help Archive 0 15/06/2010 04:08 AM
Animation dosent work the first time but second Torran Help Archive 6 22/02/2010 01:13 PM
animation does not work [ATC]eRaZoR Help Archive 8 20/10/2009 12:56 PM
Car doors locked animation (Need help to apply animation) yugokoral Help Archive 0 20/09/2009 06:00 PM
[Animation]singing animation klavins21 Help Archive 4 05/03/2009 06:31 PM


All times are GMT. The time now is 01:39 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.