DeleteClanTag - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: DeleteClanTag (
/showthread.php?tid=203801)
DeleteClanTag -
Lorenc_ - 28.12.2010
Hey guys, can someone make a me a DeleteClanTag, i tried many many times.. Im stuck on a part where inside of the 2 brackets detected, not sure how to remove the text inside the brackets, Thanks.
-Lorenc_
Re: DeleteClanTag -
_rAped - 28.12.2010
Try lookup strfind and strdel on the wiki.
Re: DeleteClanTag -
Lorenc_ - 28.12.2010
I used those methods. Im getting stuck on how to delete characters inside the name...
Re: DeleteClanTag -
_rAped - 28.12.2010
Well.. Can you give me an example of your code?
Re: DeleteClanTag -
Lorenc_ - 28.12.2010
pawn Код:
stock RemovePlayerClan(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if ( strfind( name , "[" , true ) == -1 )
{
strreplacechar(playername,'[',' ');
}
if ( strfind( name , "]" , true ) == -1 )
{
strreplacechar(playername,']',' ');
}
}
Re: DeleteClanTag -
cessil - 28.12.2010
here's for deleting people's tags that appear before the name
pawn Код:
stock NameWithoutTag(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
strdel(name,0,(strfind(name,"]",true,0) + 1));
return name;
}
Re: DeleteClanTag -
Lorenc_ - 28.12.2010
Doesn't that only delete that one bracket^
Re: DeleteClanTag -
_rAped - 28.12.2010
Quote:
Originally Posted by Lorenc_
Doesn't that only delete that one bracket^
|
Next time this mac is going into the wall.
-- Delete post --
Re: DeleteClanTag -
The_Gangstas - 28.12.2010
that deletes everything before ] and ] itself
but what if ppl have
Gangsta[mw]? and not
[Mw]Gangsta
Re: DeleteClanTag -
Lorenc_ - 28.12.2010
oic ill try it out
btw, the_gangstas, in my server thats forbidded lol