Raised This Month: $51 Target: $400
 12% 

TSRP Com


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
keVn
Member
Join Date: Jun 2006
Old 07-09-2006 , 01:44   TSRP Com
Reply With Quote #1

Hey, anybody know a way to edit the COM to work with other jobs?
I've found where the script is

Quote:
// Intercom Messaging
public com_message(id,Speech[])
{
new JobID, buffer[64], authid[32]
get_user_authid(id,authid,31)
select_string(id,"money","JobID","steamid",au thid,buffer)
if(equali(buffer,"")) return PLUGIN_HANDLED
JobID = str_to_num(buffer)
if((JobID >= MCPDSTART && JobID <= MCPDEND) || (JobID >= MCMDSTART && JobID <= MCMDEND))
{
new players[32], num, authid2[32], buffer2[64], JobID2
get_players(players,num,"ac")
for(new i = 0; i < num;i++)
{
get_user_authid(players[i],authid2,31)
select_string(players[i],"money","JobID","steamid",authid2,buffer2 )
JobID2 = str_to_num(buffer2)
if((JobID2 >= MCPDSTART && JobID2 <= MCPDEND) || (JobID2 >= MCMDSTART && JobID2 <= MCMDEND)) client_print(players[i],print_chat,Speech)
}
}
else client_print(id,print_chat,"[TalkArea] Need to work for MCPD/MCMD to use Intercom^n")
return PLUGIN_HANDLED
In HarbuRP_Talkarea.sma
But what do I change so that it works for another job other than MCPD
keVn is offline
Jordan44053
Junior Member
Join Date: Aug 2005
Old 07-09-2006 , 02:06   Re: TSRP Com
Reply With Quote #2

Quote:
// Intercom Messaging
public com_message(id,Speech[])
{
new JobID, buffer[64], authid[32]
get_user_authid(id,authid,31)
select_string(id,"money","JobID","steamid",au thid,buffer)
if(equali(buffer,"")) return PLUGIN_HANDLED
JobID = str_to_num(buffer)
if((JobID >= MCPDSTART && JobID <= MCPDEND) || (JobID >= MCMDSTART && JobID <= MCMDEND))
{
new players[32], num, authid2[32], buffer2[64], JobID2
get_players(players,num,"ac")
for(new i = 0; i < num;i++)
{
get_user_authid(players[i],authid2,31)
select_string(players[i],"money","JobID","steamid",authid2,buffer2 )
JobID2 = str_to_num(buffer2)
if((JobID2 >= MCPDSTART && JobID2 <= MCPDEND) || (JobID2 >= MCMDSTART && JobID2 <= MCMDEND)) client_print(players[i],print_chat,Speech)
}
}
else client_print(id,print_chat,"[TalkArea] Need to work for MCPD/MCMD to use Intercom^n")
return PLUGIN_HANDLED
The two parts in bold are what you'll need to change. The first is who can send a /com message, the second is who can receive it.

Say you wanted JobIDs 99-105 to be able to use the /com, too.

Quote:
// Intercom Messaging
public com_message(id,Speech[])
{
new JobID, buffer[64], authid[32]
get_user_authid(id,authid,31)
select_string(id,"money","JobID","steamid",au thid,buffer)
if(equali(buffer,"")) return PLUGIN_HANDLED
JobID = str_to_num(buffer)
if((JobID >= MCPDSTART && JobID <= MCPDEND) || (JobID >= MCMDSTART && JobID <= MCMDEND) || (JobID >= 99 && JobID <= 105))
{
new players[32], num, authid2[32], buffer2[64], JobID2
get_players(players,num,"ac")
for(new i = 0; i < num;i++)
{
get_user_authid(players[i],authid2,31)
select_string(players[i],"money","JobID","steamid",authid2,buffer2 )
JobID2 = str_to_num(buffer2)
if((JobID2 >= MCPDSTART && JobID2 <= MCPDEND) || (JobID2 >= MCMDSTART && JobID2 <= MCMDEND) || (JobID2 >= 99 && JobID2 <= 105)) client_print(players[i],print_chat,Speech)
}
}
else client_print(id,print_chat,"[TalkArea] Need to work for MCPD/MCMD to use Intercom^n")
return PLUGIN_HANDLED
You'd need to add what's in bold, and edit it to do what you want. You can add more than one.

Quote:
if((JobID2 >= MCPDSTART && JobID2 <= MCPDEND) || (JobID2 >= MCMDSTART && JobID2 <= MCMDEND) || (JobID2 >= 99 && JobID2 <= 105) || (JobID2 >= 512 && JobID2 <= 519) || (JobID2 >= 931 && JobID2 <= 952))
Make sure to add the same ones to the first if, too, so that the JobIDs can send as well as receive.

Tell me if this is too complicated, I'm somewhat used to this stuff.

Edit:
Quote:
// Intercom Messaging
public com_message(id,Speech[])
{
new JobID, buffer[64], authid[32]
get_user_authid(id,authid,31)
select_string(id,"money","JobID","steamid",au thid,buffer)
if(equali(buffer,"")) return PLUGIN_HANDLED
JobID = str_to_num(buffer)
if((JobID >= MCPDSTART && JobID <= MCPDEND) || (JobID >= MCMDSTART && JobID <= MCMDEND))
{
new players[32], num, authid2[32], buffer2[64], JobID2
get_players(players,num,"ac")
for(new i = 0; i < num;i++)
{
get_user_authid(players[i],authid2,31)
select_string(players[i],"money","JobID","steamid",authid2,buffer2 )
JobID2 = str_to_num(buffer2)
if((JobID2 >= MCPDSTART && JobID2 <= MCPDEND) || (JobID2 >= MCMDSTART && JobID2 <= MCMDEND)) client_print(players[i],print_chat,Speech)
}
}
else client_print(id,print_chat,"[TalkArea] Need to work for MCPD/MCMD to use Intercom^n")
return PLUGIN_HANDLED
You may want to change that, too.

Edit2:

Remove the space from au thid, otherwise it won't work.
__________________

Last edited by Jordan44053; 07-09-2006 at 02:14.
Jordan44053 is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-09-2006 , 02:14   Re: TSRP Com
Reply With Quote #3

Um...

Code:
select_string(id,"money","JobID","steamid",au thid,buffer)

You have au thid instead of authid, that will give you an error when you go to compile. What Jordan44053 said will fix the coms though.
Shurik3n is offline
Jordan44053
Junior Member
Join Date: Aug 2005
Old 07-09-2006 , 02:16   Re: TSRP Com
Reply With Quote #4

Quote:
Edit2:

Remove the space from au thid, otherwise it won't work.
I had already edited it.
__________________
Jordan44053 is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-09-2006 , 02:21   Re: TSRP Com
Reply With Quote #5

Oh, I guess when I got to this thread you hadn't edited it yet.
Shurik3n is offline
keVn
Member
Join Date: Jun 2006
Old 07-09-2006 , 02:24   Re: TSRP Com
Reply With Quote #6

Alright thanks!
Do you know of any flashbang mods or rope mod? =D
keVn is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-09-2006 , 07:31   Re: TSRP Com
Reply With Quote #7

I think harbu's item mod has flash bangs in it already. As for a rope mod I am sure you can find something on these forums that would work, however porting it into harbu's item mod might take a little work.
Shurik3n is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode