22.12.2014, 16:11
Hey,
I've tried to make a thing where it sends messages to everyone once you killed them. For e.g. if you are a Cop and you kill someone, it will send a message to everyone saying, "Police Officer has taken ***** down!". And if you are a CIV, it will send another message to the player. But it doesn't send the message, it did before but I don't know what happened.
How can I fix this problem?
Thanks,
FunnyBear
I've tried to make a thing where it sends messages to everyone once you killed them. For e.g. if you are a Cop and you kill someone, it will send a message to everyone saying, "Police Officer has taken ***** down!". And if you are a CIV, it will send another message to the player. But it doesn't send the message, it did before but I don't know what happened.
pawn Код:
if (killerid != INVALID_PLAYER_ID)
{
if ( gTeam[ killerid ] == TEAM_COPS )
{
new
str[ 128 ], name[ MAX_PLAYER_NAME ], name1[ MAX_PLAYER_NAME ];
GetPlayerName( killerid, name, MAX_PLAYER_NAME );
GetPlayerName( playerid, name1, MAX_PLAYER_NAME );
format( str, sizeof ( str ), "[TAKEN DOWN] Police Officer %s[%d] has taken down %s[%d]", name, killerid, name1, playerid );
SendClientMessageToAll( SERVER_MESSAGE, str );
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
if ( gTeam[ killerid ] == TEAM_C.I.A )
{
new
str[ 128 ], name[ MAX_PLAYER_NAME ], name1[ MAX_PLAYER_NAME ];
GetPlayerName( killerid, name, MAX_PLAYER_NAME );
GetPlayerName( playerid, name1, MAX_PLAYER_NAME );
format( str, sizeof ( str ), "[TAKEN DOWN] CIA Officer %s[%d] has taken down %s[%d]", name, killerid, name1, playerid );
SendClientMessageToAll( SERVER_MESSAGE, str );
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
if ( gTeam[ killerid ] == TEAM_ARMY )
{
new
str[ 128 ], name[ MAX_PLAYER_NAME ], name1[ MAX_PLAYER_NAME ];
GetPlayerName( killerid, name, MAX_PLAYER_NAME );
GetPlayerName( playerid, name1, MAX_PLAYER_NAME );
format( str, sizeof ( str ), "[TAKEN DOWN] Army Officer %s[%d] has taken down %s[%d]", name, killerid, name1, playerid );
SendClientMessageToAll( SERVER_MESSAGE, str );
SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
}
if ( gTeam[ killerid ] == TEAM_SWAT )
{
new
str[ 128 ], name[ MAX_PLAYER_NAME ], name1[ MAX_PLAYER_NAME ];
GetPlayerName( killerid, name, MAX_PLAYER_NAME );
GetPlayerName( playerid, name1, MAX_PLAYER_NAME );
format( str, sizeof ( str ), "[TAKEN DOWN] Swat Officer %s[%d] has taken down %s[%d]", name, killerid, name1, playerid );
SendClientMessageToAll( SERVER_MESSAGE, str );
SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
}
if ( !IsALawEnforcement(killerid))
{
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 6);
new string[128],
str[128];
/////////////
new name1[MAX_PLAYER_NAME];
GetPlayerName(playerid, name1, MAX_PLAYER_NAME);
format(str, sizeof(str), "You have been caught on CCTV murdering %s, the {001EFF}LSPD {FFFFFF}have been informed.", name1);
SendClientMessage(killerid, 0xFFFFFFFF, str);
///////////////////////////WANTED LEVEL
format(string, sizeof(string), "[MURDER] Wanted level %d!", GetPlayerWantedLevel(playerid) + 6);
SendClientMessage(killerid, 0xFF9500FF, string);
}
}
Thanks,
FunnyBear


