Onplayerdie?
#1

I want to make it so when a player dies it said a client message like "You fell unconscious and were sent to the hospital, You survived allthough you lost 30 minutes of memory"

I aslo use a rp script but dont know where to put this
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerDeath
Reply
#3

Quote:
Originally Posted by Serbish
Посмотреть сообщение
It doesnt give me information about sending client info. I want it to just say to the person who died. Not to everyone
Thank you for trying to help
Reply
#4

it will show u on the screen:
Код:
GameTextForPlayer(playerid,"~g~You fell unconscious and were sent to the hospital!~g~ You survived allthough you lost 30 minutes of memory",6000,3);
it will show u on the chatbox:
Код:
SendClientMessage(playerid, 0xCC6633,"~g~You fell unconscious and were sent to the hospital!~g~ You survived allthough you lost 30 minutes of memory");
Reply
#5

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
       SendClientMessage(playerid, 0xD8D8D8FF, "Welcome to my server!");  
       return 1;
}
Reply
#6

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
it will show u on the screen:
Код:
GameTextForPlayer(playerid,"~g~You fell unconscious and were sent to the hospital!~g~ You survived allthough you lost 30 minutes of memory",6000,3);
it will show u on the chatbox:
Код:
SendClientMessage(playerid, 0xCC6633,"~g~You fell unconscious and were sent to the hospital!~g~ You survived allthough you lost 30 minutes of memory");
I dont know where to put this??.
Thank you for the funtion!!

Can i have the whole function?? So like The whole thing like onplayerdie or something?
Reply
#7

Quote:
Originally Posted by Bam23
Посмотреть сообщение
It doesnt give me information about sending client info. I want it to just say to the person who died. Not to everyone
Thank you for trying to help
sorry for the dueble posting,i wanted to quote it on other reply..

to make it u can do this:
Код:
new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    SendClientMessage(playerid, 0xFFFFFF,"%s is death!!!!");
to all:
Код:
new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    SendClientMessageToAll(playerid, 0xFFFFFF,"%s is death!!!!");
Reply
#8

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
sorry for the dueble posting,i wanted to quote it on other reply..

to make it u can do this:
Код:
new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    SendClientMessage(playerid, 0xFFFFFF,"% is death!!!!");
to all:
Код:
new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    SendClientMessageToAll(playerid, 0xFFFFFF,"% is death!!!!");


Don't make that just make this:

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
       SendClientMessage(playerid, 0xD8D8D8FF, "Welcome to my server!");  
       return 1;
}
Reply
#9

Quote:
Originally Posted by Bam23
Посмотреть сообщение
I dont know where to put this??.
Thank you for the funtion!!
under
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}
u can find it by clicking Ctrl+F and whriting " onplayerdeath " then enter
Reply
#10

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Don't make that just make this:
its to put the player name in the line...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)