#1

I want to hide death message and the client message that sends to the chat when a player dies, it will be hidden if the player is in the deathmatch arena but if he is not, it will show up, also, i want to do so if a player dies inside dm arena he won't get +1 for killing or -1 for dying.
Reply
#2

The death message will either show up for everybody, or it won't, there's no optionality for that one.

As for the +1 -1 deal, I'll lay it out for you.

Code:
Top of script:

new arena[MAX_PLAYERS];
in your arena teleport command:
Code:
arena[playerid] = 1;
And then last of all, OnPlayerDeath:

Code:
if (arena[playerid] == 1)
{
Here put whatever you want to happen while you die in the arena

Then makes sure you put: arena[playerid] = 0;
That'll make it so the game doesn't think you're still in the arena after you die while in it.
}
else
{
Here do whatever happens when you die outside of the arena
}
Reply
#3

If you're satisfied with my answer, I'd appreciate REP++
Reply
#4

Problem is that if a person dies inside there, he doesn't spawn back in there,

pawn Code:
// under OnPlayerDeath
    if(InDMS[playerid] == 1)
    {
        new Random = random(sizeof(RandomDMSpawns));
        SetPlayerPos(playerid, RandomDMSpawns[Random][0], RandomDMSpawns[Random][1], RandomDMSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomDMSpawns[Random][3]);
        SetTimer("DMSTimer", 3000, false);
    }
Reply
#5

Bump
Reply
#6

Quote:
Originally Posted by Ananisiki
View Post
Problem is that if a person dies inside there, he doesn't spawn back in there,

pawn Code:
// under OnPlayerDeath
    if(InDMS[playerid] == 1)
    {
        new Random = random(sizeof(RandomDMSpawns));
        SetPlayerPos(playerid, RandomDMSpawns[Random][0], RandomDMSpawns[Random][1], RandomDMSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomDMSpawns[Random][3]);
        SetTimer("DMSTimer", 3000, false);
    }
i didn't code for a while so i might not be that familiar with samp's callbacks as i was before.
But im quiet sure that when you put that under onplayerdeath, like you did.
It's not gonna work. the player is dying... he'll be spawned after that.
so you might put that under onplayerspawn

also, idk if onplayerspawn is called when you do setplayerpos
so if you end up in an endless loop of spawning... just set InDMS[playerid] to 0 after the first time

just try... that's what it is all about, self-experience.
just fool around with some code, that's how you'll learn it
Reply
#7

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)