Need Help Objects
#1

Okay I been Working On this For Some Time Now.. I am Unable to get it to work Could anyone help me .. please
here the code im working on.. I'm trying to Show in a Textdraw Of the Object Location For a fire script i been working on.. And I did try to count objects as Well I think it counted all CreatedObjects I just Want the Objects Listed under Flame[slot] Counted.. And its Locations

pawn Код:
CMD:mission(playerid,params[])
{
#pragma unused params
    new string[128],zone[MAX_ZONE_NAME];
    if(MissionJoined[playerid] == 1)
    {
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[playerid][pFireTeam] == 2)
            {
                for(new f; f < MAX_FLAMES; f++)
                {
                    GetPlayer2DZone(f, fzone, MAX_ZONE_NAME);
                }
                new Float:x,Float:y,Float:z;
                new slot = GetFlameSlot();
                new Flame[slot]objectcount;
                if(slot == -1) {return slot;}
                Flame[slot][Flame_Exists] = 1;
                Flame[slot][Flame_x] = x;
                Flame[slot][Flame_y] = y;
                Flame[slot][Flame_z] = z - Z_DIFFERENCE;
                GivePlayerWeapon(playerid,42, 10000);
                GivePlayerWeapon(playerid,6,1);
                MissionJoined[playerid] = 0;
                new fltext[64];
                Flame[slot][FireLocation] = GetObjectPos(18689,Flame[slot][Flame_x], Flame[slot][Flame_y], Flame[slot][Flame_z]);
                format(string, sizeof(string), "(Radio) Unit(%d) Enroute To %s"playerid,fzone);
                SendClientMessage(i, 0xFF6347AA, string);
                format(fltext,sizeof(fltext),"Sources %d /n Fire Location: %s",fzone);
                TextDrawSetString(firelocation, fltext);
                TextDrawShowForPlayer(playerid, firelocation);
                TextDrawHideForPlayer(playerid, FMMessage);
            }
            else
            {
                SendClientMessage(playerid, 0xFFFFFF, "You're Not On Fire Duty");
            }
        }
        return 1;
    }
    else if(MissionJoined[playerid] == 0)
    {
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[playerid][pFireTeam] == 2)
            {
                format(string, sizeof(string), "(Radio) Unit(%d) Retired From Mission",playerid);
                SendClientMessage(i, 0xFF6347AA, string);
                MissionJoined[playerid] = 1;
                ResetPlayerWeapons(playerid);
                TextDrawShowForPlayer(playerid,FMMessage);
            }
            else
            {
                SendClientMessage(playerid, 0xFFFFFF, "You're Not On Fire Duty");
            }
        }
    }
    return 1;
}
Reply
#2

I dont quite understand what you mean you want to count the objects you made for the mission?
Reply
#3

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
I dont quite understand what you mean you want to count the objects you made for the mission?
Argg Learn how to Read Before Posting Dont look at my Code... I said I am Unable to Show in a TEXTDRAW Where exactly The OBJECT is Located... Located means AREA.. What Area Is the Object in It would show me the Zone Name... Then I was Wanting it To Count How Many Objects Are in that Location...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)