SA-MP Forums Archive
How come it's possible? - 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: How come it's possible? (/showthread.php?tid=225900)



How come it's possible? - Medal Of Honor team - 14.02.2011

When a player got killed, the first name is not coming

pawn Код:
new DeathNamerz[MAX_PLAYER_NAME];
new KillNamerz[MAX_PLAYER_NAME];
new str2[128];
GetPlayerName( playerid, DeathNamerz, sizeof(DeathNamerz) );
GetPlayerName ( killerid, KillNamerz, sizeof(KillNamerz) );
format( str2, sizeof(str2), " NEWS: %s has killed %s and earn points ", KillNamerz, DeathNamerz );
SendClientMessage( playerid, yellow, str2 );
This is how it looks

Код:
NEWS: has killed Ricky and earn points



AW: How come it's possible? - .LaaRs. - 14.02.2011

im your scripter ask me i can explain to u xD
public OnPlayerDeath(..){
new DeathNamerz[MAX_PLAYER_NAME];
new KillNamerz[MAX_PLAYER_NAME];
new str2[128];
GetPlayerName( playerid, DeathNamerz, sizeof(DeathNamerz) );
GetPlayerName ( killerid, KillNamerz, sizeof(KillNamerz) );
format( str2, sizeof(str2), " NEWS: %s has killed %s and earn points ", KillNamerz, DeathNamerz );
SendClientMessage( playerid, yellow, str2 );
return 1;
}
sould work


Re: AW: How come it's possible? - Ash. - 14.02.2011

Quote:
Originally Posted by .LaaRs.
Посмотреть сообщение
im your scripter ask me i can explain to u xD
public OnPlayerDeath(..){
new DeathNamerz[MAX_PLAYER_NAME];
new KillNamerz[MAX_PLAYER_NAME];
new str2[128];
GetPlayerName( playerid, DeathNamerz, sizeof(DeathNamerz) );
GetPlayerName ( killerid, KillNamerz, sizeof(KillNamerz) );
format( str2, sizeof(str2), " NEWS: %s has killed %s and earn points ", KillNamerz, DeathNamerz );
SendClientMessage( playerid, yellow, str2 );
return 1;
}
sould work
Its exactly the same...

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     new pName[24], kName[24], str[128];
     GetPlayerName(playerid, pName, 24); GetPlayerName(playerid, kName, 24);
     format(str, sizeof(str), "[NEWS] %s killed %s and earned some points", kName, pName);
     SendClientMessageToAll(yellow, str);
     //Try that, its pretty much the same, just without the seperation colon. - I had problems with that the other day
     return 1;
}