SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

Participe do fórum, é rápido e fácil

SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

SSGamers - 12 Anos online por você.

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Chegou o novo tema 6.5.5 - SSGamers - Servidores online de qualidade - Aproveite e entre para nossa comunidade, inscreva-se já! - Ouça nossa web radio - Veja nossas novidades - Participe dos nossos setores de jogos online - Parcerias aberta fale já com um administrador.

    SetPlayerCheckpoint

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


    Steam Steam : WeslleySSGames
    Zello : WeslleySSGames
    Mensagens : 11378
    Moedas : 1031978
    Data de inscrição : 06/10/2011
    Idade : 28
    Localização : Brasil

    SetPlayerCheckpoint Empty SetPlayerCheckpoint

    Mensagem por Weslley_Script Ter 28 Mar 2023 - 11:15

    Description:
    Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed.

    Parameters:
    (playerid, Float:x, Float:y, Float:z, Float:size)
    playerid The ID of the player for whom to set a checkpoint.
    Float:x The X coordinate to set the checkpoint at.
    Float:y The Y coordinate to set the checkpoint at.
    Float:z The Z coordinate to set the checkpoint at.
    Float:size The size of the checkpoint.

    Return Values:
    1: The function executed successfully.
    0: The function failed to execute. This means the player specified does not exist.

    Example Usage:

    // In this example the player's checkpoint will be set when they spawn.
    // On entering the checkpoint they will receive $1000 and the checkpoint will be disabled.

    Código:
    new bool:onCheck[MAX_PLAYERS];

    Código:
    public OnPlayerSpawn(playerid)
    {
        SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
        onCheck[playerid] = true;
        return 1;
    }

    Código:
    public OnPlayerEnterCheckpoint(playerid)
    {
        if(onCheck[playerid]) // if it's true  
        {
            GivePlayerMoney(playerid, 1000);
            DisablePlayerCheckpoint(playerid);
            onCheck[playerid] = false;
        }
        return 1;
    }

    Fonte: WIKI SA-MP



    SetPlayerCheckpoint D07Xwqb
    SetPlayerCheckpoint Yjab9HN

      Data/hora atual: Qui 9 maio 2024 - 16:22