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-12-2014, 12:13 AM #11
thanks corey :y:
03-12-2014, 12:31 AM #12
Originally posted by logiicdope View Post
thanks corey :y:


No problem
04-29-2014, 07:56 PM #13
Updated to 1.11
05-13-2014, 09:20 PM #14
Updated to 1.12
06-08-2014, 07:57 PM #15
Updated to 1.13
06-10-2014, 11:47 PM #16
Azus
Little One
Originally posted by BlackPanther 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 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


Wouldn't it make more sense to do
    
public void onPlayerSpawned(int c, string text)
{
if(PS3.Extension.ReadByte(0x00F47403) == 1)
{
Thread.Sleep(2000);
iPrintlnBold(c, text);
}
}


and call it with
    
onPlayerSpawned(0, "^1Well that was easy");
or
onPlayerSpawned(12, "^1Fgt");


So that you can call it and use whatever text you want whenever you want and you wouldn't have to have the function in your projects multiple times if you wanted it to say different things?

that's the only comment I have to make, other than that good stuff xD
Last edited by Azus ; 06-10-2014 at 11:49 PM.
06-11-2014, 12:05 AM #17
Originally posted by Azus View Post
Wouldn't it make more sense to do
    
public void onPlayerSpawned(int c, string text)
{
if(PS3.Extension.ReadByte(0x00F47403) == 1)
{
Thread.Sleep(2000);
iPrintlnBold(c, text);
}
}


and call it with
    
onPlayerSpawned(0, "^1Well that was easy");
or
onPlayerSpawned(12, "^1Fgt");


So that you can call it and use whatever text you want whenever you want and you wouldn't have to have the function in your projects multiple times if you wanted it to say different things?

that's the only comment I have to make, other than that good stuff xD


No lol I use that function for everything. That's why you have checks for different functions within it
06-11-2014, 12:09 AM #18
Azus
Little One
Originally posted by BlackPanther View Post
No lol I use that function for everything. That's why you have checks for different functions within it


True lol, I've been using it the way I asked about so just thought I would throw it out there ahahahah
06-18-2014, 04:34 PM #19
iTпDM
Vault dweller
Nice Man i like it :yes:

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo