if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("Congratulations you won (WhateverHere)!", "SYSTEM", 2011);
}
}
}
Idk if this is what you wanted or not!
Nah dude.. Its supposed a multiuser code.. I can type /Congratulate Vortex ( Or anyother user on the server.. So.. That code is a simple one but your completely wrong it should be able to full in the name automatically from the code
LIKE
Code:
World.SendMsgToAll("Congratulations to" Char.Name "for wining the event, "SYSTEM", 2011);
I'm not familiar with making commands of this sort..
So could someone edit this and post it back to me?
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("", "", 2011);
}
}
}
I just need it to work this way.. if i type /congratulate vortex.. for example
I want a message to appear (2011) Congratulations to Vortex for wining the event..
Don't flame.. I'll possibly learn from this..
Thanks
Vortex
P.S If your still gonna flame, remember some of you cant even spell congratulate
if u want to send the chat to all online players that would be like that
Code:
if (Splitter[0] == "/congratulate")
{
World.SendMsgToAll([B][U][U]"Congratulation "+ Splitter[1]+" for winning the event" , "From Here <System for ex>"[/U][/U][/B], 2011);
}
and u wont need the foreach statement
but if u want to send the msg to one player then u can use your code editing the message line like that
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsg([B][U]"Congratulation "+ Splitter[1]+" for winning the event" , "From Here <System for ex>"[/U][/B], 2011);
}
}
}
Yes.. But I have no definition for Name.. Give me one.
you already put it in your code at the if statement anyway edit the ".Name" to whatever the Character name your source calls (what source u use ?)
and once again , u need to send the msg to that char or to all online chars ?
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("Congratulations to " + Char.Name + " for wining the event", "SYSTEM", 2011);
}
}
}
Useless commands ey? I've never disrespected you.. And I plan for that favour in return.. You seem to be a **** fella? look in your server for usless commands.. Let me do things my way and you do yours your way..
++, My events have been well coded.. Maybe its not fully made by commands.. because some npcs are involved.. I still have a pretty awesome pk event and find event..
The last person in the pkp tourny wins.. I type /startncp and he can claim the price.. also
/nopk on - off Which has been transformed into a start command.. anyway.. Just letting you know.. I got a plan..
B> DriftCity CBS Code | S> War Rock Code / Bounty Bay Code etc. 10/05/2010 - Trading - 1 Replies Hi,
wie schon im Titel beschrieben. In der CBS vom November gab es Bonusodes für mehrere Spiele. Ich benötige DriftCity Codes. Kann sonst für alle anderen Spiele die Codes biten, einige auch doppelt.
Hier eine Liste der Spiele und Bonusaktionen:
- (2x) War Rock
- (2x) War of Titans
- (2x) World of Warcraft
- (1x) Warhammer Online
- (1x) Bounty Bay online
[Release] Congratulate code 05/26/2009 - CO2 PServer Guides & Releases - 13 Replies Yeah whatever.. Just incase you wanted it.. I take no credit other than posting it..
if (Splitter == "/congratulate")
{
World.SendMsgToAll("Congratulations to"+ Splitter+" for winning the event" , "", 2011);
}
Or if you want a foreach statment
if (Splitter == "/congratulate")