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
07-04-2014, 03:39 PM #20
Mango_Knife
In my man cave
1.14:
    
if (PS3.Extension.ReadByte(0x00f47902 + client * 0x3700) == 1)
{
Thread.Sleep(2000);
RPC.iPrintln(client, "^2Press [{+melee}] to open the mod menu");
}
07-04-2014, 08:39 PM #21
Why check if they have died? That's not spawn monitoring at all lol, since they could be in a core game, and watch the whole 5sec kill cam. Instead, you should still check inside sessionState_t, but check for the 0 (playing). Back on MW2 TU8, in like july time, I wrote a function monitoring pretty much everything (spawning, deaths, killing, assists ect), you should go check it out maybe.
07-04-2014, 10:29 PM #22
Originally posted by Bitwise View Post
Why check if they have died? That's not spawn monitoring at all lol, since they could be in a core game, and watch the whole 5sec kill cam. Instead, you should still check inside sessionState_t, but check for the 0 (playing). Back on MW2 TU8, in like july time, I wrote a function monitoring pretty much everything (spawning, deaths, killing, assists ect), you should go check it out maybe.

Lol this is really old, besides the title does say ghetto so, it's just something I threw together.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo