16
Add-Ons / Re: Event_SetAsSpawnBrick
« on: September 04, 2010, 08:12:12 PM »
Double post bump, excuse me.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Its sorta confusing to me. I used to know some console commands but now i don't so now if anything im going backwards in learning it
function serverCmdAll(%client)
{
if(!%client.isAdmin && !%client.isSuperAdmin) //checking if client is admin or super admin, if not, he cant use this code
return; //stops, and returns nothing
for(%i=0; %i<clientGroup.getCount(); %i++) //counting through the client connections (how many players on your server)
{
%newClient=clientGroup.getObject(%i); //getting the client!
if(isObject(%newClient.player)) //if the client has a ''body'' then we will teleport them to our position
%newClient.player.setTransform(%client.player.getTransform()); //newclient is the client, so we use newclient.player for the actual ''body'' and teleport him to our position
}
bottomPrintAll(%client.name @" has teleported everyone to his position!",3); //bottom prints to everyone, the 3, is 3 seconds
}
I meen, I only want player damage to work in the Arena section of the RPG, but not outside of it, so this minigame idea will help :P
Use my event to disable damage, search it.
Would work well for the RPG I'm making.I want an Arena, but no PVP for the whole landscape.
Code: [Select]function bottlesofspam(%a, %b, %c)
{
if(%b > 0)
{
if(%c >= 3)
{
%c = 1;
%b--;
}
else
{
%c++;
}
switch(%c)
{
case 1:
commandtoserver('messagesent', %b @ " bottles of spam on the wall.");
break;
case 2:
commandtoserver('messagesent', %b @ " bottles of spam!);
break;
case 3:
commandtoserver('messagesent', "Take one down, unleash the spam...");
break;
}
if(%a > 0)
{
schedule(%a, 0, bottlesofspam, %a, %b, %c);
}
}
else
{
commandtoserver('messagesent', "Looks like we ran out of bottles of spam!");
}
}
OH NOOO,ZOMBIES!MUST GET TEH BUNNEH!!! *gets bunny and goes out door*EAT DIS YUH MUTHA forgetIN
BRAIN SUCKIN..O WAIT NOO AAAAHAHHHH AAAAGAGHHH AAAAAAHAHHAHAHAH CURSE YOU BUNNNNNNYYYY.
Test complete
But, what IS possible, (I've seen it before) is to say something when you join, for example this one guy joined my server once, and RIGHT when he connected, he said hi to everyone on the server. It was like:
This One Guy connected
This One Guy: Hi Penguin/Person!
This One Guy: Hi Chrono!
This One Guy: Hi lilboarder32!
All at once right when he joined.
What code did he use?
Search. It's not possible.