Remove Clan tag from player name
#1

Hello !
Please i want to remove Clan tag from player name in this function:
PHP код:
GetPlayerName(playerid,loginname,sizeof(loginname));
for(new 
clanidclanid MAX_CLANSclanid++)
{
    if(
strfind(loginname,ClanInfo[clanid][cClanTag],true) != -1)
    {
               
// Code 
Because i have some problems with MySQL / UCP , it sends the name with the clan tag which appears as a non registered player in UCP ( factions history ),
Thanks, i'll apperciate your help.
Reply
#2

use strdel for that

PHP код:
new idx strfind(loginnameClanInfo[clanid][cClanTag], true);
if(
idx != -1) {
    
strdel(loginnameidxidx strlen(ClanInfo[clanid][cClanTag]));

Reply
#3

Thanks bro, i searched for it in wiki but i didn't knew that it will work like that, thakns again :*
Reply
#4

and how to give the player his clan tag back ? after INSERT into faction_logs
Reply
#5

strdel only deletes the clan tag of the local variable loginname, the player name should be the same as before
if you want to get the complete name use GetPlayerName again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)