Help Plz!!
#1

Hi, how to use this https://sampwiki.blast.hk/wiki/TextDrawCreate and this https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
to make Tuning car checkpoint?
like this:
http://im31.gulfup.com/v3ED4.png
http://im31.gulfup.com/dFQTo.png
http://im31.gulfup.com/rP0Sx.png
http://im31.gulfup.com/v5D9r.png
Reply
#2

can someone help me?? plz
Reply
#3

any one??
Reply
#4

please i need this
Reply
#5

Look at the wiki pages. It clearly shows how to create checkpoints.

Код:
new Text:upgrade_text_draw;
new bool:can_upgrade[MAX_PLAYERS];

public OnGameModeInit()
{
    upgrade_text_draw = TextDrawCreate(240.0,580.0,"Press space to repair your vehicle.");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    TextDrawShowForPlayer(playerid, upgrade_text_draw);
    can_upgrade[playerid] = true;
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    TextDrawHideForPlayer(playerid, upgrade_text_draw);
    can_upgrade[playerid] = false;
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_JUMP))
    {
        if(can_upgrade[playerid] == true)
        {
            SetPlayerVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
        }
    }
return 1;
}
This code is not tested and may contain bugs, since I wrote it right here on the forums.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)