08.10.2014, 16:56
and the msg
pawn Код:
CMD:fwarn(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new userID;
new string[256];
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
if(sscanf(params, "u", userID)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/fwarn [playerid]");
{
if(playerVariables[playerid][pGroupRank] >= 6 && PlayerVariables[userID][pGroup] == PlayerVariables[playerid][pGroup])
{
GetPlayerName(userID, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playerVariables[userID][pFWarns] += 1;
format(string, sizeof(string), "You have give a faction warn to %s!", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "%s has give you a faction warn!", sendername);
SendClientMessage(userID, COLOR_LIGHTRED, string);
}
else SendClientMessage(playerid, COLOR_LIGHTRED, "Error: Player is not in your Faction!");
}
}
return 1;
}