Hey guys. I want to have a faction named to be shown in a dialog.
pawn Код:
COMMAND:invite(playerid,params[])
{
new id,string[100];
if(FactionInfo[playerid][fowner] !=1) return SendClientMessage(playerid,COLOR_RED,"You're not a faction owner.");
if(sscanf(params,"u",id))return SendClientMessage(playerid,COLOR_GREY,"USAGE:/invite [playerid]");
if(PlayerInfo[id][Faction] >1) return SendClientMessage(playerid,COLOR_RED,"This player is already in a faction.");
format(string,sizeof(string),"You are invited for %s",FactionInfo[playerid][fname]);
ShowPlayerDialog(id,4,DIALOG_STYLE_MSGBOX,"Faction Invite",string,"Accept","Decline");
return 1;
}
The faction name doesnt shows up.