Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request SOLVED|death messages
#1
hey guy's

i would like to bring back death message's and this is how i'am doing it at the moment
Code:
onPlayerSpawned()
{
    self endon("disconnect");
    for(;;)
    {
        self waittill("spawned_player");
self thread setWeapons();
            self waittill("death");    
                self iPrintlnBold("^1YOU DIED SILLY");
but i would like to do random message's at death
something like
Code:
            self waittill("death");    
                self thread randomMessage();
Code:
randommessage ()
{
    switch(RandomInt(15))
    {
        case 0:
            self.randommessage  = "Death message here";
        break;
        case 1:
            self.randommessage  = "Death message here";
        break;
        case 2:
            self.randommessage  = "Death message here";
        break;
        case 3:
            self.randommessage  = "Death message here";
        break;
        case 4:
            self.randommessage  = "Death message here";
        break;
        case 5:
            self.randommessage  = "Death message here";
        break;
        case 6:
            self.randommessage  = "Death message here";
        break;
        case 7:
            self.randommessage = "Death message here";
        break;
        case 8:
            self.randommessage  = "Death message here";
        break;
        case 9:
            self.randommessage  = "Death message here";
        break;
             10:
            self.randommessage  = "Death message here";
        break;
        case 11:
            self.randommessage  = "Death message here";
        break;
        case 12:
            self.randommessage  = "Death message here";
        break;
        case 13:
            self.randommessage  = "Death message here";
        break;
        case 14:
            self.randommessage = "Death message here";
        break;
    }
        self thread maps\mp\gametypes\_hud_message::hintMessage(self.randommessage, self.randommessage );

}
so im haveing the same issue with the random killstreaks so fixing one should fix the other , please help find out why im getting a bad syntax when starting a private match
here's my screenshot of error attached
and my full _rank.gsc


Attached Files Image(s)
   

.zip   rank.zip (Size: 5.39 KB / Downloads: 6)
Reply

#2
@ hintmessage take out 1 self.randommessage
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#3
ok tryed that and it did not work same error
maybe someone could post there working code ?
Reply

#4
well they say you caint ask a stupid question but i'm feeling like abit of dick here spending over 3 hour's on something i dont understand , this is really starting to beat me Sad
Reply

#5
maybe instead of using cases, try else ifs
Reply

#6
thanks man so would i do that like this
Code:
randommessage ()
{
    switch(RandomInt(15))
    {
        else if 0:
            self.randommessage  = "Death message here";
        break;
        else if 1:
            self.randommessage  = "Death message here";
        break;
        else if 2:
            self.randommessage  = "Death message here";
        break;
        else if 3:
            self.randommessage  = "Death message here";
        break;
  
etc...
or do i have to re wright it ?
Reply

#7
randommsg = RandomInt(15);

if (randommsg == 0) {
...
} else if (randommsg == 1) {
...
}

Or something like that. Never coded any mods mor Call of Duty games and for the Source Engine is pretty much like C++ (and really compiled, not parsed and not pseudo C++).
Reply

#8
Code:
randomMessage()
{
    self messageSelect();
    self maps\mp\gametypes\_hud_message::hintMessage( self.randommessage );
}

messageSelect()
{
    switch(RandomInt(5))
    {
        case 0:
            self.randommessage = "Death message here";
        break;
        case 1:
            self.randommessage = "Death message here";
        break;
        case 2:
            self.randommessage = "Death message here";
        break;
        case 3:
            self.randommessage = "Death message here";
        break;
        case 4:
            self.randommessage = "Death message here";
        break;
    }
}

try this?
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#9
Might be the double spaces between self.randommessage and =
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#10
(03-15-2011, 15:04)AZUMIKKEL Wrote: Might be the double spaces between self.randommessage and =

Noticed that too, I dont know if the code I posted above is working took out the double spaces there also..
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help [C#] WebClient how to know real url [solved] narkos 21 12,965 09-09-2013, 15:21
Last Post: surtek
  How to delete HUD elements on death? camxxcore 6 5,047 08-21-2013, 08:54
Last Post: Yamato
Information Help How to edit new derived entry? (Solved) SSonic70 1 2,736 08-20-2013, 15:29
Last Post: Nekochan
  [Release] Advanced timed messages with script support DePa95 0 4,071 08-07-2013, 19:35
Last Post: DePa95
  Change death animation Keouf 3 4,001 07-05-2013, 18:39
Last Post: Nekochan
  Help Remove Death Barriers? Help Please! camxxcore 1 2,563 06-28-2013, 09:38
Last Post: Yamato
Information How to change text messages in MP (.ff edit) giofrida 5 4,824 05-02-2013, 20:05
Last Post: Pozzuh
  Turoial please, how do you add death machine to your slots? Erik The Born 9 5,176 02-15-2013, 21:38
Last Post: Gladio
  Help [solved]red hitmark mod? founderlj 7 4,719 12-30-2012, 23:06
Last Post: Pozzuh
  !weapon Plugin help pls [solved] Hallla 0 1,971 12-30-2012, 14:04
Last Post: Hallla

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.