Command Problem[ss]
#8

HEre its the command that i invite members to a faction

Quote:

COMMAND:invite(playerid, params[])
{
if(PlayerInfo[playerid][ranklvl] == 2 && PlayerInfo[playerid][authority_invite] != 1) return SendClientError(playerid, CANT_USE_CMD);
if(PlayerInfo[playerid][ranklvl] > 2) return SendClientError(playerid, CANT_USE_CMD);
if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, CANT_USE_CMD);
new iPlayer;
if( sscanf ( params, "u", iPlayer)) return SCP(playerid, "[PlayerID/PartOfName]");
if(!IsPlayerConnected(iPlayer) || iPlayer == playerid) return SendClientError(playerid, PLAYER_NOT_FOUND);
if(GetPlayerFaction(iPlayer) != CIV) return SendClientError(playerid, "Player is not a civilian!");
if(PlayerInfo[iPlayer][playerlvl] < 1 && PlayerInfo[playerid][playerteam] != COPS)
return SendClientError(playerid, "The player is level 1.");
SetPVarInt(iPlayer, "InvitedToFaction", PlayerInfo[playerid][playerteam]);
SetPVarInt(iPlayer, "InvitedBy", playerid);
format(iStr, sizeof(iStr), "%s has invited you to join %s. Use ~r~/accept faction~w~ to join %s.", RPName(playerid), PlayerInfo[playerid][PTeamName],PlayerInfo[playerid][PTeamName]);
ShowInfoBox(iPlayer, "Faction Invite", iStr);
return 1;
}

Reply


Messages In This Thread
Command Problem[ss] - by Diti1 - 11.11.2014, 17:20
Re: Command Problem[ss] - by Diti1 - 11.11.2014, 19:34
Re: Command Problem[ss] - by DavidBilla - 11.11.2014, 20:13
Re: Command Problem[ss] - by Diti1 - 11.11.2014, 21:08
Re: Command Problem[ss] - by DavidBilla - 12.11.2014, 00:25
Re: Command Problem[ss] - by Diti1 - 12.11.2014, 11:59
Re: Command Problem[ss] - by DavidBilla - 12.11.2014, 14:21
Re: Command Problem[ss] - by Diti1 - 12.11.2014, 17:46
Re: Command Problem[ss] - by BornHuman - 12.11.2014, 20:01
Re: Command Problem[ss] - by Diti1 - 12.11.2014, 20:27

Forum Jump:


Users browsing this thread: 1 Guest(s)