Onplayerdie? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Onplayerdie? (
/showthread.php?tid=244021)
Onplayerdie? -
Bam23 - 25.03.2011
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
Re: Onplayerdie? -
Serbish - 25.03.2011
https://sampwiki.blast.hk/wiki/OnPlayerDeath
Re: Onplayerdie? -
Bam23 - 25.03.2011
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
Re: Onplayerdie? -
[ProX]BlueFire - 25.03.2011
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");
Respuesta: Onplayerdie? -
Alex_Obando - 25.03.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid, 0xD8D8D8FF, "Welcome to my server!");
return 1;
}
Re: Onplayerdie? -
Bam23 - 25.03.2011
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?
Re: Onplayerdie? -
[ProX]BlueFire - 25.03.2011
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!!!!");
Respuesta: Onplayerdie? -
Alex_Obando - 25.03.2011
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; }
|
Re: Onplayerdie? -
[ProX]BlueFire - 25.03.2011
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
Re: Respuesta: Onplayerdie? -
[ProX]BlueFire - 25.03.2011
Quote:
Originally Posted by Alex_Obando
Don't make that just make this:
|
its to put the player name in the line...