Post: [1.13] Ghetto onPlayerSpawned function
03-11-2014, 03:33 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I released this in the Elite Section, but I don't know if people really check over there, so I decided to move it over here.

I made this a couple days ago, but didn't know if anyone would like it, so I'm just going to release.

What it is: It's a really ghetto way to monitor player spawned (Kind of...)

I use it for welcome text, and a notification for every time a player spawns after death.

What you're going to need: You must login or register to view this content., You must login or register to view this content., and I believe that is it!

First add this code:

    
public void onPlayerSpawned(int c)
{
if(PS3.Extension.ReadByte(0x00F47403) == 1)
{
Thread.Sleep(2000);
iPrintlnBold(c, "^5This is welcome text for player spawned!");
}
}


And Optional:

    
public static void iPrintln(int Client, string Input)
{
SV_GameSendServerCommand(Client, "e \"" + Input + "\"");
}
public static void iPrintlnBold(int Client, string Input)
{
SV_GameSendServerCommand(Client, "c \"" + Input + "\"");
}


Remember to swap out the RPC.Call part if you have a different CallFunction!

Just monitor which ever client you want by putting this in a timer or backgroundworker
     
onPlayerSpawned(0);//Monitors Death For Client 0


I hope this is useful for some of you making your mod menus/tools! Also, sorry if this thread was hard to understand! :p

Credits:
    
Imcsx - PS3Lib
Me - Function
Last edited by Black Panther ; 06-08-2014 at 07:56 PM. Reason: Updated to 1.13

The following 11 users say thank you to Black Panther for this useful post:

-SuperMan, Azus, FusionIsDaName, ImSooCool, M-alShammary, milky4444, xProvXKiller, RatchetBooty, SC58, Swiss, Winter
03-11-2014, 03:53 AM #2
SC58
Former Staff
Originally posted by AlmightySo View Post
I released this in the Elite Section, but I don't know if people really check over there, so I decided to move it over here.

I made this a couple days ago, but didn't know if anyone would like it, so I'm just going to release.

What it is: It's a really ghetto way to monitor player spawned (Kind of...)

I use it for welcome text, and a notification for every time a player spawns after death.

What you're going to need: You must login or register to view this content., You must login or register to view this content., and I believe that is it!

First add this code:

    
public void MonitorDeath(int c)
{
if(PS3.Extension.ReadByte(G_Client(c) + 0x2F83) == 1)
{
Thread.Sleep(2000);
iPrintlnBold(c, "^5This is welcome text for player spawned!");
}
}
public uint G_Client(int client)
{
return 0xF43B00 + ((uint)client * 0x3700);
}


And Optional:

    
public static void SV_GameSendServerCommand(int Client, string Command)
{
int num = (int)RPC.Call(0x53D984, (object)Client, (object)0, (object)Command);
}
public static void iPrintln(int Client, string Input)
{
SV_GameSendServerCommand(Client, "e \"" + Input + "\"");
}
public static void iPrintlnBold(int Client, string Input)
{
SV_GameSendServerCommand(Client, "c \"" + Input + "\"");
}


Remember to swap out the RPC.Call part if you have a different CallFunction!

Just monitor which ever client you want by putting this in a timer or backgroundworker
     
MonitorDeath(0);//Monitors Death For Client 0


I hope this is useful for some of you making your mod menus/tools! Also, sorry if this thread was hard to understand! :p

Credits:
    
Imcsx - PS3Lib
Me - Function


There a couple way of doing this that i know of, But this way will work fine if u really wanna go this way with it.

The following user thanked SC58 for this useful post:

03-11-2014, 07:00 AM #3
-SuperMan
Krazy Weed
Nice Posting it Here!!

The following user thanked -SuperMan for this useful post:

03-11-2014, 10:16 AM #4
Originally posted by SC58 View Post
There a couple way of doing this that i know of, But this way will work fine if u really wanna go this way with it.


Yeah, I was trying to think of a function that I could call with RPC, but didn't think of one, but this one will do for now :p
03-11-2014, 12:15 PM #5
Mango_Knife
In my man cave
Originally posted by AlmightySo View Post
I released this in the Elite Section, but I don't know if people really check over there, so I decided to move it over here.

I made this a couple days ago, but didn't know if anyone would like it, so I'm just going to release.

What it is: It's a really ghetto way to monitor player spawned (Kind of...)

I use it for welcome text, and a notification for every time a player spawns after death.

What you're going to need: You must login or register to view this content., You must login or register to view this content., and I believe that is it!

First add this code:

    
public void MonitorDeath(int c)
{
if(PS3.Extension.ReadByte(G_Client(c) + 0x2F83) == 1)
{
Thread.Sleep(2000);
iPrintlnBold(c, "^5This is welcome text for player spawned!");
}
}
public uint G_Client(int client)
{
return 0xF43B00 + ((uint)client * 0x3700);
}


And Optional:

    
public static void SV_GameSendServerCommand(int Client, string Command)
{
int num = (int)RPC.Call(0x53D984, (object)Client, (object)0, (object)Command);
}
public static void iPrintln(int Client, string Input)
{
SV_GameSendServerCommand(Client, "e \"" + Input + "\"");
}
public static void iPrintlnBold(int Client, string Input)
{
SV_GameSendServerCommand(Client, "c \"" + Input + "\"");
}


Remember to swap out the RPC.Call part if you have a different CallFunction!

Just monitor which ever client you want by putting this in a timer or backgroundworker
     
MonitorDeath(0);//Monitors Death For Client 0


I hope this is useful for some of you making your mod menus/tools! Also, sorry if this thread was hard to understand! :p

Credits:
    
Imcsx - PS3Lib
Me - Function


What you saying that when the player spawn he getting the Println text spawning?
03-11-2014, 01:22 PM #6
RatchetBooty
Former Staff
Good job Almighty, always releasing the good stuff :p

The following user thanked RatchetBooty for this useful post:

03-11-2014, 01:23 PM #7
Originally posted by Knife View Post
What you saying that when the player spawn he getting the Println text spawning?


Well you could add anything there. So every time you spawn you can spawn with a certain gun or with a certain mod
03-11-2014, 01:25 PM #8
Mango_Knife
In my man cave
Originally posted by AlmightySo View Post
Well you could add anything there. So every time you spawn you can spawn with a certain gun or with a certain mod


Nice!
I will do it like that You must login or register to view this content.
So when you spawn you getting the host name Winky Winky

The following user thanked Mango_Knife for this useful post:

iNDMx
03-11-2014, 01:27 PM #9
RatchetBooty
Former Staff
Wow there are endless possibilities with this method lol, this is going to be fun.

The following user thanked RatchetBooty for this useful post:

03-11-2014, 01:40 PM #10
xProvXKiller
Climbing up the ladder
AlmightySo with a grate Release :yes:

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo