AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Solved] Cut the country name on the nick (https://forums.alliedmods.net/showthread.php?t=264368)

indraraj striker 06-15-2015 01:34

[Solved] Cut the country name on the nick
 
Nick was
S!lenttttt
the bad killer
shadowszzz

Nick change after join the server
(India) S!lenttttt
(France) the bad killer
(Germany) shadowszzz
how to cut the country name ?

new Name[33]
get_user_name(id,Name,31)//now nick is (India) S!lenttttt
i want to erase this (India) and save on nvault his original nick

Hartmann 06-15-2015 08:04

Re: [Request] Cut the country name on the nick
 
???Country On Name

HamletEagle 06-15-2015 09:37

Re: [Request] Cut the country name on the nick
 
Quote:

Originally Posted by indraraj striker (Post 2308031)
Nick was
S!lenttttt
the bad killer
shadowszzz

Nick change after join the server
(India) S!lenttttt
(France) the bad killer
(Germany) shadowszzz
how to cut the country name ?

new Name[33]
get_user_name(id,Name,31)//now nick is (India) S!lenttttt
i want to erase this (India) and save on nvault his original nick

So, you still want to display the country, but you want to save without it ? Then, it is easy. Backup his name before it gets changed and use the old one when saving.
Or, if you have other plugin that change names and you don't want to edit it, you can try to remove the prefix, but it won't be 100% accurate.

PHP Code:

new Name[32], NewName[32]
copy(NewNamecharsmax(NewName), Name[contain(Name")")+1]) 

Now, NewName will have his original name. Remember that I would not recommend doing this when you have the first option, because it can be innacurate.

fysiks 06-15-2015 21:38

Re: [Request] Cut the country name on the nick
 
Easy, use SteamID. Done.

indraraj striker 06-15-2015 23:29

Re: [Request] Cut the country name on the nick
 
Thanks a lot HamletEagle


All times are GMT -4. The time now is 20:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.