[HELP] Creating a new command...
#4

Quote:
Originally Posted by Dwane
View Post
pawn Code:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( strcmp( cmdtext, "/getup", true, 6 ) == 0 ) {
        SetTimerEx( "GetUp", 90000, 0, "i", playerid );
        return 1;
    }
    return 0;
}

forward GetUp( playerid );
public GetUp( playerid )
{
    new
        Float:health;

    GetPlayerHealth( playerid, health );
    if( health <= 20 ) {
        SetPlayerHealth( playerid, 25 );
        TogglePlayerControllable( playerid, 1 );
    }
    return 1;
}
Thats basiclly an exact copy of what I siad.
Reply


Messages In This Thread
[HELP] Creating a new command... [STILL NEED HELP] - by Da' J' - 19.01.2012, 16:41
Re: [HELP] Creating a new command... - by milanosie - 19.01.2012, 16:44
Re: [HELP] Creating a new command... - by Konstantinos - 19.01.2012, 16:55
Re: [HELP] Creating a new command... - by milanosie - 19.01.2012, 17:14
Re: [HELP] Creating a new command... - by Konstantinos - 19.01.2012, 17:26
Re: [HELP] Creating a new command... - by milanosie - 19.01.2012, 18:10
Re: [HELP] Creating a new command... - by Da' J' - 19.01.2012, 18:11
Re: [HELP] Creating a new command... - by mSp - 19.01.2012, 18:22
Re: [HELP] Creating a new command... - by Da' J' - 19.01.2012, 18:44
Re: [HELP] Creating a new command... - by mSp - 19.01.2012, 18:51

Forum Jump:


Users browsing this thread: 1 Guest(s)