I need help about 1 little thing, i think that it will be easy for u so pls help
#1

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...
Reply
#2

TEAM SPEAK:

ID: 248 075 569
PASSWORD: 4798
Reply
#3

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.
Reply
#4

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;
}
}
Reply
#5

Quote:
Originally Posted by _TeRmiNaToR_
1-
pawn Код:
public OnPlayerConnect(playerid)
{
    GameTextForPlayer(playerid,"Hello",8000,5);
    return 1;
}
What's this for?
Reply
#6

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...
Reply
#7

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.
Reply
#8

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?
Reply
#9

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.
Reply
#10

I not fully understand.
Sorry for my bad english.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)