Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Problema /getmats


Question

Posted (edited)

Problema intalnita (descriere): /getmats bug
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): in jos
Imagini / Video (optional): - 
Ati incercat sa rezolvati singur?: Nu

Cand fac o tura de mats, si daca vreau sa dau find pe hq los vagos ajung acolo si imi da infiniti de bani cum rezolv ?

CMD:getmats(playerid, params[]) {
    if(jobVariables[playerVariables[playerid][pJob]][jJobType] != 1) return 1;

    if(IsPlayerInRangeOfPoint(playerid, 5, 597.7913,-1245.6721,17.7928)) {
        if(playerVariables[playerid][pCheckpoint] == 0) {
            if(playerVariables[playerid][pMoney] += 1000) {
                SetPlayerCheckpoint(playerid, 1713.6470,916.7785,10.3817, 10);
                SendClientMessage(playerid, COLOR_WHITE, "Reach the checkpoint to collect your materials.");
                playerVariables[playerid][pCheckpoint] = 2;
            }
            else {
                return SendClientMessage(playerid, COLOR_GREY, "You need to pay $1000 to collect materials.");
            }
        }
        else {
            format(szMessage, sizeof(szMessage), "You already have an active checkpoint (%s), reach it first, or /killcp.", getPlayerCheckpointReason(playerid));
            SendClientMessage(playerid, COLOR_WHITE, szMessage);
        }
    }

    return 1;
}

Edited by Kallen
A fost nevoie

3 answers to this question

Recommended Posts

  • 0
Posted

imediat

CMD:find(playerid, params[])
{
    new targetID;
    if(sscanf(params, "u", targetID)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/find [playerid]");
    {
        if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 || jobVariables[playerVariables[playerid][pJob]][jJobType] == 2 || groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 12)
        {
            new name[MAX_PLAYER_NAME];
            GetPlayerName(targetID, name, MAX_PLAYER_NAME);
            FindTime[playerid] = 1;
            PlayerFind[playerid] = targetID;
            new Float: x, Float: y, Float: z;
            GetPlayerPos(targetID,x,y,z);
            new Float: fDistance = GetPlayerDistanceFromPoint(playerid, x,y,z);
            format(szMessage, 256, "Server has set you a checkpoint to %s (%d). Distance: %.0f meters.",name, targetID, fDistance);
            SCM(playerid,COLOR_YELLOW, szMessage);
            SetPlayerCheckpoint(playerid,x,y,z,3.0);
        }
    }
    return 1;
}

  • 0
Posted

if(playerVariables[playerid][pCheckpoint] != 0) return SendClientMessage(playerid, -1, "Ai deja un checkpoint activ!");

-> adaugi acea conditie la comanda /find, /where, /jobs si la orice comanda care ti-ar putea amplasa un checkpoint.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.