Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » page poke system
page poke system [message #468239] Thu, 31 May 2012 10:22 Go to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

So say I put this on a switch and I set the team to GDI.

What am I missing to only page GDI the msg?


void DSG_Poke_PPAGE::Poked(GameObject *obj, GameObject *poker)
{
	if (dopage)
	{
		int x;
		x = Get_Int_Parameter("Team");
		if (CheckPlayerType(poker,x))
		if (_stricmp(Get_Parameter("PPage"),"0") != 0)
		{
			char p[250];
			sprintf(p,"ppage %d %s",Get_Player_ID(poker),Get_Parameter("PPage"));
			Console_Input(p);
		}
		dopage = false;
		Commands->Start_Timer(obj,this,5.0f,150);
		Commands->Enable_HUD_Pokable_Indicator(obj, false);
	}
}


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: page poke system [message #468240 is a reply to message #468239] Thu, 31 May 2012 10:35 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
General (4 Stars)
if ( Commands->Get_Object_Type(obj) == 1 )


1 = GDI, 0 = Nod

If you're working on a player ID instead of GameObj* you need to use Get_Team(PlayerID).


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Thu, 31 May 2012 10:36]

Report message to a moderator

Re: page poke system [message #468454 is a reply to message #468239] Tue, 05 June 2012 15:06 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

OK I redid it, now it only works for that team, but when I poke it as nod, gdi can see the message that is suppose to be my team only.

void DSG_Poke_Page::Poked(GameObject *obj,GameObject *poker)
{
	int paraTeam = Get_Int_Parameter("Team");
	if (Get_Player_Type(poker) == paraTeam)
	{
		char ppage[256];
		sprintf(ppage,"%s",Get_Parameter("PPage"));
		Send_Message(Get_Int_Parameter("Red"),Get_Int_Parameter("Green"),Get_Int_Parameter("Blue"),ppage);
		Commands->Create_2D_WAV_Sound(Get_Parameter("WavSound"));
    }
}


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: page poke system [message #468456 is a reply to message #468239] Tue, 05 June 2012 15:31 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Send_Message_Team(int team, unsigned int red, unsigned int green, unsigned int blue, const char *msg)


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

[Updated on: Tue, 05 June 2012 15:32]

Report message to a moderator

Re: page poke system [message #468462 is a reply to message #468456] Tue, 05 June 2012 17:57 Go to previous message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Ethenal wrote on Tue, 05 June 2012 17:31

Send_Message_Team(int team, unsigned int red, unsigned int green, unsigned int blue, const char *msg)



Thanks but I figured it out, someone else helped me in the mean time.

Send_Message_Team(paraTeam, Get_Int_Parameter("red") , Get_Int_Parameter("green") , Get_Int_Parameter("blue"), tpage);


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Previous Topic: 4.0 doesn't support some stuff that 3.4 did??
Next Topic: anyone know where I can get the following textures?
Goto Forum:
  


Current Time: Sat Dec 07 08:34:57 MST 2024

Total time taken to generate the page: 0.00667 seconds