Vida infinita
#7

Quote:
Originally Posted by OTACON
Посмотреть сообщение
que es esto? #define INFINITY (Float:0x7F800000) O_O?...
pawn Код:
new
    Float:gPlayerHealth[MAX_PLAYERS];
 
#if !defined INFINITY
    #define INFINITY (Float:0x7F800000)
#endif
 
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_ACTION))
    {
        // They just pressed the action key, save their
        // old health for restoration.
        GetPlayerHealth(playerid, gPlayerHealth[playerid]);
        SetPlayerHealth(playerid, INFINITY);
    }
    else if (RELEASED(KEY_ACTION))
    {
        // They just let go of action - restore
        // their old health again.
        SetPlayerHealth(playerid, gPlayerHealth[playerid]);
    }
    return 1;
}

Lo puedes ver en

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply


Messages In This Thread
Vida infinita - by ValenRatti - 16.11.2013, 20:16
Respuesta: Vida infinita - by benjas09 - 16.11.2013, 20:21
Re: Vida infinita - by ValenRatti - 16.11.2013, 20:30
Respuesta: Vida infinita - by benjas09 - 16.11.2013, 20:35
Re: Vida infinita - by ValenRatti - 16.11.2013, 20:38
Respuesta: Vida infinita - by OTACON - 16.11.2013, 20:42
Respuesta: Vida infinita - by benjas09 - 16.11.2013, 20:47
[No subject] - by ValenRatti - 16.11.2013, 20:49
Respuesta: Vida infinita - by benjas09 - 16.11.2013, 21:27
Re: Vida infinita - by ValenRatti - 16.11.2013, 21:58

Forum Jump:


Users browsing this thread: 1 Guest(s)