Endless-Guide v.2
This forum as just been made please give us time while our staff members work on it we are still lookin for moderators(staffs) please email ''endless-guide@hotmail.com'' for application


The Guide for Endless-Online Players
 
HomeCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Ruthless Aggression
Tue Oct 05, 2010 9:21 am by Microchip

» Copycat command
Tue Oct 05, 2010 9:16 am by Microchip

» #title command
Fri Sep 03, 2010 5:49 pm by michael032777

» Rev 187 character creation error
Fri Sep 03, 2010 5:38 pm by michael032777

» Modernwarfare2pwns.no-ip.org
Tue Aug 24, 2010 4:29 pm by artsyfartsy

» Want Hacks for Endless Online? Join EO-Hackers!
Fri Aug 06, 2010 7:48 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
Wed Aug 04, 2010 11:21 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
Wed Aug 04, 2010 11:21 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
Wed Aug 04, 2010 11:21 am by Slymask3

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Forum
Affiliates
free forum
 

Share | 
 

 #event announcement

Go down 
AuthorMessage
oxyda
Admin
avatar

Posts : 38
Join date : 2010-03-26

PostSubject: #event announcement   Sun Mar 28, 2010 11:57 am

command.length() == 3 && command.compare(0,3,"event") == 0 && arguments.size() >= 2 && this->player->character->admin >= static_cast<int>(this->server->world->admin_config["sp"])
alright thats quite a block. first off, its not working because it creates a condition that will never be satisfied. You need to have the command length set to 5 (event is 5 characters) and you need to have command.compare(0,5,"event"). You do not need the == 0 because i don't believe compare returns any information.
your arguments should = 1 because i'm assuming you want to type in "$event aeven" and have a message that says "yo event in aeven" and warps you there. There is only one argument in the command, the name of the map where the event is held. In this case your statement should be && arguments.size() == 1.
Lastly you will need a variable in your admin config file that says "sp = 3" or whatever admin level you want to have type this command. Although you might want to name it something other than sp because its kind of confusing as to what that might mean.
final statement:
else if (command.length() == 5 && command.compare(0,5,"event") == 0 && arguments.size() == 1 && this->player->character->admin >= static_cast<int>(this->server->world->admin_config["sp"])) {
hope this helps.
Back to top Go down
View user profile
oxyda
Admin
avatar

Posts : 38
Join date : 2010-03-26

PostSubject: Re: #event announcement   Sun Mar 28, 2010 12:01 pm

else if (command.length() == 3 && command.compare(0,3,"event") == 0 && arguments.size() >= 2 && this->player->character->admin >= static_cast<int>(this->server->world->admin_config["sp"]))
{
//Event Code for Aeven
if (arguments[0] == "aeven")
{
int map;
int x;
int y;
map = 5;
x = 41;
y = 47;

this->player->character->Warp(map, x, y,WARP_ANIMATION_NONE);
this->server->world->ServerMsg("Attention!! "+ this->player->character->name + " is having a event at: Aeven. Please go to the Aeven to participate in the event!" );

}
//Event Code for Race Track
if (arguments[0] == "racetrack")
{
int map;
int x;
int y;
map = 107;
x = 91;
y = 89;

this->player->character->Warp(map, x, y,WARP_ANIMATION_NONE);
this->server->world->ServerMsg("Attention!! "+ this->player->character->name + " is having a event at: Race Track. Please go to the Race Track to participate in the event!" );

}
//Event Code for Hell
if (arguments[0] == "hell")
{
int map;
int x;
int y;
map = 222;
x = 37;
y = 53;

this->player->character->Warp(map, x, y,WARP_ANIMATION_NONE);
this->server->world->ServerMsg("Attention!! "+ this->player->character->name + " is having a event at: Hell Maze. Please go to the Hell Maze to participate in the event!" );
}
//Event Code for Arena
if (arguments[0] == "arena")
{
int map;
int x;
int y;
map = 46;
x = 13;
y = 35;

this->player->character->Warp(map, x, y,WARP_ANIMATION_NONE);
this->server->world->ServerMsg("Attention!! "+ this->player->character->name + " is having a event at: Arena (Red). Please go to the Red Arena to participate in the event!" );
}
}

By Sausage
Back to top Go down
View user profile
 
#event announcement
Back to top 
Page 1 of 1
 Similar topics
-
» fantage bacck to school event!
» Olympic Games Event
» Marathon event medal mishap (:O Alliteration)
» Alien help
» Fantage school event/Updates

Permissions in this forum:You cannot reply to topics in this forum
Endless-Guide v.2 :: Softwares :: EOSERV-
Jump to: