what is a C++ code to select all players on a map and add them an item?
+Repx2
what is a C++ code to select all players on a map and add them an item?
+Repx2
Last edited by Ballwinkle; 02-24-2008 at 12:04 PM.
any1 know?
try thatCode:if (pPlayer->GetMapID == 1) { plr->GetItemInterface()->AddItemToFreeSlot(objmgr.CreateItem(123456, plr)) }
1>..\src\FreeWoW\ACBG.cpp(82) : error C2065: 'pPlayer' : undeclared identifier
1>..\src\FreeWoW\ACBG.cpp(82) : error C2227: left of '->GetMapID' must point to class/struct/union/generic type
1> type is ''unknown-type''
add me on msn: [email protected] and ill see if i can help you.
done.......
I am also looking for this for my custom BG except I just want to teleport them all to a certain place. Its going to be alot more complicated than doublehex said
hmm interesting, i havent tried anything like that.
it doesnt get the players.....
Summon All Players?? Kalimdor summon all Players o East Kingdom?
Comand: .masssummon
All users Summon
gastric what i was thinking is that you could setup something like a npc or gamobject that could port you to the area for the battle, and it would check you race and set you on a team according to your race (horde or alliance) like the battlemasters do, if you look at battlegrounds i think they set them up that way.
and yes, lol he just needs to add "Player * pPlayer" to his script
yea, its possible, not the best thing but possible, im lookin at battlemaster and battleground scripts to get an idea of how this would work
im lookin at battlemaster gossip script and i see this:
im thinking, is it possible that teams are already pre-setup...uint32 Team = plr->GetTeam();
if(Team > 1) Team = 1;
Last edited by doublehex; 02-26-2008 at 07:18 PM.
here try this
Code:void SomeFunction( Player* plr ) { if(plr->GetMapID() == XXXXX) //Change XXXXX to the map id { plr->GetItemInterface()->AddItemToFreeSlot(objmgr.CreateItem(XXXXX, plr)); //Change XXXXX to some number } }