[Ajuda] Sistema presente
#1

Bom Eu Criei o Sistema de presentes para ser solto em qualquer lugar do mapa mais Somente eu Consigo Velo e So eu To Conseguindo pega-lу queria que os outros players pode-sem pega-lo e tambйm Velo Agradeзo desde jah
pawn Код:
if(strcmp(cmdtext, "/tesouro", true) == 0)
    {
        new strcone[128];
        if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "Vocк Nao й um Administrador Ou Nao Possui Leveu Suficiente de Admin!");
        if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_GRAD1, "Vocк Nao pode botar um Tesouro dentro de um veнculo.");
        format(strcone, sizeof(strcone), "[Tesouro BLL]O Administrador %s Soltou Um Tesouro em San Andreas Vб Atras dele e Receba Uma Recompensa!",sendername);
        SendClientMessageToAll(COLOR_LIGHTBLUE, strcone);
        GetPlayerPos(playerid, Xp, Yp, Zp);
        cX = Xp;
        cY = Yp;
        cZ = Zp;
        tesouroobj[playerid] = F_CreateObject(1550, Xp, Yp, Zp-0.65, 0, 0, 0);
        SetPlayerPos(playerid, Xp, Yp, Zp+0.8);
        format(strcone, sizeof(strcone), "EVENTO TESOURO INICIADO POR %s!",sendername);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i)) GameTextForAll(strcone, 5000, 5);
            tesourocriado[i] = 1;
        }
        return 1;
    }
Na Callback OnPlayerKeyStateChange
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            new DinheiroCaixinha = 1000 + random(20000);
            new RespeitoCaixinha = random(6);
            new stringp[128];
            if(tesourocriado[i] == 1)
            {
                if(IsPlayerInRangeOfPoint(i, 2.0,cX,cY,cZ))
                {
                    new location[MAX_ZONE_NAME];
                    GetPlayer2DZone(i, location, MAX_ZONE_NAME);
                    format(stringp, sizeof(stringp), "[Tesouro BLL]:[%s] Escontrou o Tesouro Em:[%s] e Ganhou R$[%d] e de Respeito[%d].",PlayerName(i),location,DinheiroCaixinha, RespeitoCaixinha);
                    SendClientMessageToAll(COLOR_LIGHTBLUE,stringp);
                    GivePlayerMoney(i, DinheiroCaixinha);
                    PlayerInfo[i][pExp] += RespeitoCaixinha;
                    tesourocriado[i] = 0;
                    F_DestroyObject(tesouroobj[i]);
                }
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)