That's full part of code
Код:
public OnPlayerCheat(playerid, cheatid, source[])
{
new elc_str[120],elc_reason[60],elc_name[MAX_PLAYER_NAME];
GetPlayerName(playerid, elc_name, sizeof(elc_name));
format(elc_str,sizeof(elc_str),"( ! ) %s has been punished: ",elc_name);
switch(cheatid)
{
case 1: format(elc_reason,sizeof(elc_reason),"Money Cheat ( %s $ )",source);
case 2: format(elc_reason,sizeof(elc_reason),"Banned For Weapon Cheat ( %s )",source);
case 3: format(elc_reason,sizeof(elc_reason),"Ammo Cheat ( %s Bullets )",source);
case 4: format(elc_reason,sizeof(elc_reason),"Ammo Block Cheat");
case 5: format(elc_reason,sizeof(elc_reason),"Speed Cheat");
case 6: format(elc_reason,sizeof(elc_reason),"Airbreak/Teleport Cheat");
case 7: format(elc_reason,sizeof(elc_reason),"Health Cheat");
case 8: format(elc_reason,sizeof(elc_reason),"Armour Cheat");
case 9: format(elc_reason,sizeof(elc_reason),"Vehicle Spawn Cheat");
case 10: format(elc_reason,sizeof(elc_reason),"Vehicle Crasher");
}
strcat(elc_str,elc_reason);
SendMessageToRAdmins(0xBD0000FF,elc_str);
return 1;
}
#endif
/*----------------------------------------------------------------------------*/
stock SendMessageToRAdmins(color,const msg[])
{
for (new i=0; i<MAX_PLAYERS; i++)
{
if(!ToAdminLevel(i)) SendClientMessage(i,color,msg);
}
}
/*----------------------------------------------------------------------------*/
enum pInfo
{
pAdmin,//admin level
//
};
///////////
new PlayerInfo[Max_Players][pInfo];
//
ToAdminLevel(playerid,level)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin]>= level && level <=6)
{
return 1;
}
return 0;
}