Losing Health When Entering a Checkpoint [HELP] +REP
#5

Quote:
Originally Posted by MEW273
Посмотреть сообщение
Replace your code with the following.
pawn Код:
public OnCheckpointEnter(playerid, checkpointid)
{
    switch(checkpointid)

    {
        case Checkpoint 1:

        {
           
            SetPlayerHealth(playerid, GetPlayerHealth(playerid)-50);

        }

    }
    return 1;
}
No! It's wrong!
PHP код:
public OnCheckpointEnter(playeridcheckpointid)
{
    switch(
checkpointid)
    {
        case 
Checkpoint 1:
        {
            new 
Float:hp;
            
GetPlayerHealth(playerid,hp);
            
SetPlayerHealth(playerid,hp-50);
        }
    }
    return 
1;

That's right!
Mencent
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)