[Consulta]Usar animacion cada x sgdos
#1

me gustaria saber como puedo hacer que una animacion puede ser usada x segundos

Para hacerlo mas simple , aprieto click izquierdo y hago x animacion pero el problema esque puedo hacer la animacion muymuy rapido xd , me gustaria que cada vezque aprieto click puede ejecutar la animacion cada x segundos
Reply
#2

Lee esto: https://sampforum.blast.hk/showthread.php?tid=439112


Y serнa algo asн:

pawn Код:
// ...
    if(newkeys & Tecla) // Cбmbialo...
    {
        new TCrear:Animacion[MAX_PLAYERS];
        if(ETiempo(Animacion[playerid]))
        {
            ATiempo(Animacion[playerid], 1000); // 1000 = 1 segundo.
            ApplyAnimation(/*...*/);
        }
    }
Reply
#3

http://pastebin.com/mp3083vi
http://pastebin.com/u/OtaconEvil
https://sampwiki.blast.hk/wiki/ApplyAnimation_Es

pawn Код:
#include <a_samp>
#include <SetTimerCMD>
#define pressed(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
    if(pressed(KEY_FIRE)){
        if(GetTimerCMD(playerid,1)) {
            new str[128];
            format(str, sizeof(str), "[TEST 2] Debes Esperar %d Segundos Para Volver a Utilizar La funcion!.", GetSegTimetCMD(playerid,1));
            return SendClientMessage(playerid, -1, str);
        }
        SetTimerCMD(playerid,1,30); //30 =  30 segundos
        //TU FUNCION...
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)