I need help about 1 little thing, i think that it will be easy for u so pls help -
Frankox - 03.04.2009
I want to make a text when a player gets killed like, "(Name of killerd) killed (name of killed pearson) with (name of gun)", and i want that text to be shown to all player connected on the server.
I think that you understend what i mean.....
Help pls...
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
Frankox - 03.04.2009
TEAM SPEAK:
ID: 248 075 569
PASSWORD: 4798
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
Pyrokid - 03.04.2009
Untested but it should work:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID)
{
//No message will show if the player commited suicide
} else {
new killername[16], playername[16], string[128];
GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
GetPlayerName(killerid,killername,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s killed %s with a %s!",killername,playername,GetPlayerWeapon(killerid));
SendClientMessageToAll(COLOR,string);
}
return 1;
}
Edit: Edited it a bit.
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
_TeRmiNaToR_ - 03.04.2009
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(!killerid == INVALID_PLAYER_ID)
{
new playername[MAX_PLAYER_NAME], string[256], killername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "%s killed by %s whit %d", playername, killername, GetPlayerWeapon(killerid));
SendClientMessage(playerid, string);
return 1;
}
}
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
Pyrokid - 03.04.2009
Quote:
Originally Posted by _TeRmiNaToR_
1-
pawn Код:
public OnPlayerConnect(playerid) { GameTextForPlayer(playerid,"Hello",8000,5); return 1; }
|
What's this for?
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
_TeRmiNaToR_ - 03.04.2009
Quote:
Originally Posted by pıʞoɹʎd
Quote:
Originally Posted by _TeRmiNaToR_
1-
pawn Код:
public OnPlayerConnect(playerid) { GameTextForPlayer(playerid,"Hello",8000,5); return 1; }
|
What's this for?
|
Quote:
Originally Posted by Frankox
I want to make a text when a player gets killed like, "(Name of killerd) killed (name of killed pearson) with (name of gun)", and i want that text to be shown to all player connected on the server.
I think that you understend what i mean.....
Help pls...
|
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
Pyrokid - 03.04.2009
Quote:
Originally Posted by _TeRmiNaToR_
Quote:
Originally Posted by Frankox
I want to make a text when a player gets killed like, "(Name of killerd) killed (name of killed pearson) with (name of gun)", and i want that text to be shown to all player connected on the server.
I think that you understend what i mean.....
Help pls...
|
|
Yeah he wants the death message to show to everyone online. He doesn't want a greet message. That's completely irrelevant.
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
Frankox - 03.04.2009
Quote:
Originally Posted by _TeRmiNaToR_
1-
pawn Код:
public OnPlayerConnect(playerid) { GameTextForAll(playerid,"Hello",8000,5); return 1; }
Edit: Edited.
|
Erm..Why that? I dont know much about scripting but i think that its for when players logs in then he gets a message HELLO over all screen?
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
Pyrokid - 03.04.2009
Quote:
Originally Posted by pıʞoɹʎd
Untested but it should work:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { if(killerid == INVALID_PLAYER_ID) { //No message will show if the player commited suicide } else { new killername[16], playername[16], string[128]; GetPlayerName(playerid,playername,MAX_PLAYER_NAME); GetPlayerName(killerid,killername,MAX_PLAYER_NAME); format(string,sizeof(string),"%s killed %s with a %s!",killername,playername,GetPlayerWeapon(killerid)); SendClientMessageToAll(COLOR,string); } return 1; }
Edit: Edited it a bit.
|
Re: I need help about 1 little thing, i think that it will be easy for u so pls help -
_TeRmiNaToR_ - 03.04.2009
I not fully understand.

Sorry for my bad english.