how to make ban,and unban cmd for offline player,and how to make /fakeban cmd
#3

Code:
CMD:fakeban
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "You are not authorised to use this command");
        {
			format(string, sizeof(string), "%s has been banned by %s, reason: %s.", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
			SendClientMessageToAllEx(COLOR_RED, string);
                        }
               return 1;
                 }
          }
}
Code:
GetPlayerNameEx(playerid) {

	new
		sz_playerName[MAX_PLAYER_NAME],
		i_pos;

	GetPlayerName(playerid, sz_playerName, MAX_PLAYER_NAME);
	while ((i_pos = strfind(sz_playerName, "_", false, i_pos)) != -1) sz_playerName[i_pos] = ' ';
	return sz_playerName;
}
If it does not work PM me then I'll actually do it correctly, I just did it in the small reply box!
Reply


Messages In This Thread
how to make ban,and unban cmd for offline player,and how to make /fakeban cmd - by PowerF - 26.12.2014, 16:06
Re: how to make ban,and unban cmd for offline player,and how to make /fakeban cmd - by jackx3rx - 26.12.2014, 17:02
Re: how to make ban,and unban cmd for offline player,and how to make /fakeban cmd - by MrCallum - 26.12.2014, 17:31
Re: how to make ban,and unban cmd for offline player,and how to make /fakeban cmd - by setes7 - 11.01.2015, 09:31

Forum Jump:


Users browsing this thread: 1 Guest(s)