61
Music / Re: Request: Electric Avenue
« on: May 18, 2010, 05:36:12 PM »what part do you want?0:00 to 1:03
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.
what part do you want?0:00 to 1:03
No.What code?
If you used just that, nothing would happen.
Obviously put in the code to change the tags where it says //Assign clan tags here
If you de admin a player wont there tag still be [Admin]?Code: [Select]package aasdf
{
function serverCmdMsgSent(%this, %client)
{
%tagPrefix = %client.clanPrefix;
%tagSuffix = %client.clanSuffix;
//Assign clan tags here
parent::ServerCmdMessageSent(%this, %line);
%client.clanPrefix = %tagPrefix;
%client.clanSuffix = %tagSuffix;
}
};
activatePackage(aasdf);
Assigning prefixes as their admin changes is stupid. Assign tags on-the-fly as they send a message, much better and not as long to write.is there a way to make the coding smaller? Instead of having like 20 lines of codes.
Save the unmodified tags
Assign clan tags appropriate to the person's admin level
parent ServerCmdMessageSent
Restore unmodified tags
if(%client.bl_id $= getNumKeyID())
should be
if(%client.bl_id != getNumKeyID() && findLocalClient() !$= %client)
Change autoadmincheck to just do [Loading] and add a onClientEnterGame and make it do [Player], [Admin], [SuperAdmin], and [Host].What do you mean?
package Tags
{
function GameConnection::autoAdminCheck(%client)
{
Parent::autoAdminCheck(%client);
%client.oldPrefix = %client.clanPrefix;
if(%client.bl_id $= getNumKeyID())
{
%client.clanPrefix = "\c6[\c2Host\c6]\c7" SPC %client.oldPrefix;
}
else if(%client.isSuperAdmin == true)
{
%client.clanPrefix = "\c6[\c2Super Admin\c6]\c7" SPC %client.oldPrefix;
}
else if(%client.isAdmin == true)
{
%client.clanPrefix = "\c6[\c2Admin\c6]\c7" SPC %client.oldPrefix;
}
else if (%client.isSuperAdmin == false)
{
%client.clanPrefix = "\c6[\c2Player\c6]\c7" SPC %client.oldPrefix;
}
else if (%client.isAdmin == false)
{
%client.clanPrefix = "\c6[\c2Player\c6]\c7" SPC %client.oldPrefix;
}
function serverCmdRTB_deAdminPlayer(%client,%victim)
{
Parent::serverCmdRTB_deAdminPlayer(%client,%victim);
if(!%victim.isAdmin)
{
%victim.clanPrefix = "\c6[\c2Player\c6]\c7" SPC %victim.oldPrefix;
}
}
function serverCmdRTB_superAdminPlayer(%client,%victim)
{
Parent::serverCmdRTB_superAdminPlayer(%client,%victim);
if(%victim.isSuperAdmin)
{
%victim.clanPrefix = "\c6[\c2Super Admin\c6]\c7" SPC %victim.oldPrefix;
}
}
function serverCmdRTB_adminPlayer(%client,%victim)
{
Parent::serverCmdRTB_adminPlayer(%client,%victim);
if(%victim.isAdmin)
{
%victim.clanPrefix = "\c6[\c2Admin\c6]\c7" SPC %victim.oldPrefix;
}
}
function serverCmdRTB_addAutoStatus(%client,%bl_id,%status)
{
Parent::serverCmdRTB_addAutoStatus(%client,%bl_id,%status);
%target = findclientbybl_id(%bl_id);
if(%target.isAdmin)
{
if(isObject(%target))
{
switch$(%status)
{
case "Admin":
%target.clanPrefix = "\c6[\c2Admin\c6]\c7" SPC %target.oldPrefix;
case "Super Admin":
%target.clanPrefix = "\c6[\c2Super Admin\c6]\c7" SPC %target.oldPrefix;
case "Player":
%target.clanPrefix = "\c6[\c2Player\c6]\c7" SPC %target.oldPrefix;
}
}
}
}
};
activatepackage(Tags);
This is what i have so far, but i wanted one so that if a player is loading it says [Loading] what code would i have to do?
You are hopeless.:o does it actually save the id?Code: [Select]function getPlayerID(%client)
{
for(%a = 0; %a < ClientGroup.getCount(); %a++)
if(ClientGroup.getObject(%a) == %client)
return %a;
}
package IDS
{
function gameConnection::autoAdminCheck(%this)
{
messageAll('',"\c7Player ID: "@ getPlayerID(%this) @" has joined the server!");
return parent::autoAdminCheck(%this);
}
};
activatepackage(IDS);
How are you using it?I make a server.cs file and put the code there...
function getPlayerID(%client)That didnt work...
{
for(%a = 0; %a < ClientGroup.getCount(); %a++)
if(ClientGroup.getObject(%a) == %client)
return %a;
}
Wait what, do you mean the first person to join is 0 and the second is 1 and so on?Yes, like if i join my ID now is 0 and if someone else comes there id is 1 but if they leave and another person comes there id is 2 not 1. like it saves there id.