#include <a_samp>
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerState(killerid) == 2)
{
if(!IsPlayerInAnyVehicle(playerid))
{
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s(%d) do NOT driveby",name ,playerid);
SendClientMessageToAll(0xFFC4E0AA, string);
return 1;
}
}
return 1;
}
#include <a_samp>
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerState(killerid) == 2)
{
if(!IsPlayerInAnyVehicle(killerid))
{
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(killerid, name, sizeof(name));
format(string, sizeof(string), "%s(%d) do NOT driveby",name ,killerid);
SendClientMessageToAll(0xFFC4E0AA, string);
return 1;
}
}
return 1;
}
new Mute[MAX_PLAYERS];
forward Unmute(playerid);
else if(dialogid == 16)
{
if(response)
{
new playerwhogotmuted[MAX_PLAYER_NAME], string[128];
GetPlayerName(adminPlayer[playerid], playerwhogotmuted, sizeof(playerwhogotmuted));
format(string, sizeof(string), "**(ADMIN MUTE)** %s(%d) %s",playerwhogotmuted, playerid, inputtext);
SendClientMessageToAll(COLOR_ADMINORANGE, string);
adminPlayer[playerid] = 0;
//Mute
Mute[adminPlayer[playerid]] = 1;
adminPlayer[playerid] = 0;
//Timer
SetTimer("Unmute",120000 ,false);
} else return SendClientMessage(playerid, COLOR_ADMINRED, "Error: You have cancelled the Mute Menu.");
}
public Unmute(playerid)
{
new playerwhogotmuted[MAX_PLAYER_NAME], string[128];
GetPlayerName(adminPlayer[playerid], playerwhogotmuted, sizeof(playerwhogotmuted));
format(string, sizeof(string), "**(ADMIN UNMUTE)** %s(%d), Read /rules /pc /commands",playerwhogotmuted, playerid);
SendClientMessageToAll(COLOR_ADMINORANGE, string);
Mute[adminPlayer[playerid]] = 0;
adminPlayer[playerid] = 0;
}
public OnPlayerText(playerid, text[])
{
if(Mute[playerid] == 1)
{
SendClientMessage(playerid, COLOR_ADMINMUTE, "You Are Muted. You Cannot Chat");
return 0;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
Mute[playerid] = 0;
return 1;
}
No offense Larsey, you're just calling everyone to help if something doesn't work.
Try fixing it yourself first and learn from your mistakes. |