01.01.2015, 15:00
(
Последний раз редактировалось Glossy42O; 02.01.2015 в 19:18.
)
EDIT: Sorry not going to release.
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, -1, "Text only for RCONS");
}
}
SetTimerEx("CheckMinigun", 1000, true, "i", playerid);
forward CheckMinigun(playerid);
public CheckMinigun(playerid)
{
if(GetPlayerWeapon(playerid) == 38) return Kick(playerid);
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerWeapon(killerid) == 38) // you check if the killer has a minigun, that's good.
{
if(IsPlayerAdmin(playerid)) // now you check if the player who got killed is rcon admin.
{
new hackername[MAX_PLAYER_NAME], str[128]; //
GetPlayerName(playerid, hackername, sizeof(hackername)); // you get the name of the person who GOT killed (not the killer).
format(str, sizeof(str), "{FF0000}ATTENTION: %s has been automaticlly reported by the server for using hacks[REASON: Minigun]", killerid); // The player who died is called a 'hacker'.
SendClientMessage(playerid, -1, str); // only if the player is rcon-admin he will get the (Wrong)message.
}
}
return 1;
}
..then you've probably used a different script than you've provided here:
pawn Код:
Maybe you should keep scripting and learning a little bit more on your own before you release stuff that does not work properly. |
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerWeapon(killerid) == 38)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
new hackername[MAX_PLAYER_NAME], str[128]; //
GetPlayerName(playerid, hackername, sizeof(hackername)); // you get the name of the person who GOT killed (not the killer).
format(str, sizeof(str), "{FF0000}ATTENTION: %s has been automaticlly reported by the server for using hacks [REASON: Minigun]", killerid); // The player who died is called a 'hacker'.
SendClientMessage(playerid, -1, str); // only if the player is rcon-admin he will get the (Wrong)message.
SendClientMessage(i, -1, str);
}
}
}
}
return 1;
}