new str[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(str, sizeof(str), "You got 2 points for killing %s!", pName);
SendClientMessage(killerid, COLOR_LIGHTBLUE, str);
I want it like this when I kill someone: You got 2 score for killing [Person I killed] That's all!
Here's my code: public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); SetPlayerPos(playerid, 2134.5957,1332.6907,10.8251); SetPlayerScore(killerid,GetPlayerScore(killerid)+2 ); for(new i=0; i<19; i++) TextDrawHideForPlayer(playerid,HealthBar[i]); GivePlayerMoney(killerid, 2500); SendClientMessage(killerid, COLOR_LIGHTBLUE, "You got 2500 Cash and 2 Score for killing); SendClientMessage(playerid, COLOR_BRIGHTRED, "You just got killed!"); SetPlayerFacingAngle(playerid,0); |
public OnPlayerDeath( playerid, killerid, reason )
{
SendDeathMessage( killerid, playerid, reason );
SetPlayerPos( playerid, 2134.5957,1332.6907,10.8251 );
SetPlayerScore( killerid,GetPlayerScore(killerid)+2 );
for(new i=0; i<19; i++) TextDrawHideForPlayer(playerid,HealthBar[i]);
GivePlayerMoney(killerid, 2500);
new szName[ MAX_PLAYER_NAME ], szStr[ 60 ];
GetPlayerName( playerid, szName, sizeof( szName ) );
format( szStr, sizeof( szStr ), "You got +2 score for killing %s", szName ); // change this message to your own
SendClientMessage( killerid, COLOR_LIGHTBLUE, szStr );
SendClientMessage(playerid, COLOR_BRIGHTRED, "You just got killed!");
SetPlayerFacingAngle(playerid,0);