Death[rep]
#1

i tired to make an thing so if i get killed by an person it says "You've been killed by %s" ..can some tellme..or for rep do it.
Reply
#2

anyone?please.
Reply
#3

pawn Код:
public OnPlayerDeath( playerid, killerid, reason ) {
    if ( killerid != INVALID_PLAYER_ID ) {
        new wepName[32];
        new deathStr[82];
        new killerName[24];
        GetPlayerName( killerid, killerName, 24 );
        GetWeaponName( reason, wepName, 32 );
        format( deathStr, 82, "You were killed by %s using a %s.", killerName );
        SendClientMessage( playerid, -1, deathStr );
    }
   
    return 1;
}
Reply
#4

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128],killed[MAX_PLAYER_NAME],killer[MAX_PLAYER_NAME];
    GetPlayerName(playerid,killed,sizeof(killed));
    GetPlayerName(killerid,killer,sizeof(killer));
    format(string,sizeof(string),"%s has been killed by %s",killed,killer);
    SendClientMessage(playerid,0xAA3333AA,string);
    return 1;
}
Reply
#5

Quote:
Originally Posted by admantis
Посмотреть сообщение
pawn Код:
public OnPlayerDeath( playerid, killerid, reason ) {
    if ( killerid != INVALID_PLAYER_ID ) {
        new wepName[32];
        new deathStr[82];
        new killerName[24];
        GetPlayerName( killerid, killerName, 24 );
        GetWeaponName( reason, wepName, 32 );
        format( deathStr, 82, "You were killed by %s using a %s.", killerName );
        SendClientMessage( playerid, -1, deathStr );
    }
   
    return 1;
}
do i do this the way i like?

PHP код:
if ( killerid != INVALID_PLAYER_ID ) {
           new 
deathStr[82];
        new 
killerName[24];
        
GetPlayerNamekilleridkillerName24 );
                
formatdeathStr82"You were killed by %s."killerName );
        
SendClientMessageplayerid, -1deathStr );
    }
    
    return 
1;

Reply
#6

Add
Код:
if ( killerid != INVALID_PLAYER_ID ) {
           new deathStr[82];
        new killerName[24];
        GetPlayerName( killerid, killerName, 24 );
                format( deathStr, 82, "You were killed by %s.", killerName );
        SendClientMessage( playerid, -1, deathStr );
Under the start of OnPlayerDeath
Reply
#7

Fixed.
Reply
#8

i made a thing and this is what it says

PHP код:
format(mess,sizeof(mess),"%s a intrat in server.  [ {278227}Tara: %s | {278227}IP: %s | {278227}Ping: %i |",GetPName(playerid),Country,IP,GetPlayerPing(playerid));
   
Line:(24) > SendAdminMessage(COLOR_ADMINstring); 
Error:
(24): error 017: undefined symbol "SendAdminMessage"
what i do i give rep here.
Reply
#9

anyone for this last thing??
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)