SA-MP Forums Archive
Remove Clan tag from player name - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Remove Clan tag from player name (/showthread.php?tid=628181)



Remove Clan tag from player name - YouHack - 07.02.2017

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.


Re: Remove Clan tag from player name - Nero_3D - 07.02.2017

use strdel for that

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




Re: Remove Clan tag from player name - YouHack - 07.02.2017

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


Re: Remove Clan tag from player name - YouHack - 07.02.2017

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


Re: Remove Clan tag from player name - Nero_3D - 07.02.2017

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