not really useful but will be for the lazy people
pawn Код:
stock SendERROR(playerid, error)
{
if(error == 1) return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
if(error == 2) return SendClientMessage(playerid,red,"ERROR: Player is not connected");
if(error == 3) return SendClientMessage(playerid,red,"ERROR: Player is not connected or is yourself or is highest level admin");
if(error == 4) return SendClientMessage(playerid,red,"ERROR: You need to be Level 4 to use this Command");
if(error == 5) return SendClientMessage(playerid,red,"ERROR: You need to be Level 3 to use this Command");
if(error == 6) return SendClientMessage(playerid,red,"ERROR: You need to be Level 2 to use this Command");
if(error == 7) return SendClientMessage(playerid,red,"ERROR: You need to be Level 1 to use this Command");
if(error == 8) return SendClientMessage(playerid,red,"ERROR: You need to be Level 5 to use this Command");
if(error == 9) return SendClientMessage(playerid,red,"ERROR: You need to be Level 6 to use this Command");
if(error == 10) return SendClientMessage(playerid,red,"ERROR: You need to be Level 7 to use this Command");
if(error == 11) return SendClientMessage(playerid,red,"ERROR: You need to be Level 8 to use this Command");
if(error == 12) return SendClientMessage(playerid,red,"ERROR: You are not in a vehicle");
return 1;
}
The text can be changed easily and to use just do
SendERROR(playerid, 1); - SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
just SendERROR(playerid, error); choose the error id from the stock