How i can remove the "_" - 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: How i can remove the "_" (
/showthread.php?tid=128075)
How i can remove the "_" -
Mr.Dzx - 16.02.2010
Hello,
So I am currently editing LARP and i want to remove "_" from all the chats and whereever the names are used.
How could i remove the "_" (If you don't understand what i mean this is an example:
James_Cool says ,without "_" it should be James Cool says: )
Re: How i can remove the "_" -
Correlli - 16.02.2010
I think LA-RP gamemode has an PlayerNameEx function which cuts the _ from player's name.
Re: How i can remove the "_" -
Mr.Dzx - 16.02.2010
LARP doesn't have PlayerNameEx...
Re: How i can remove the "_" -
SpiderPork - 16.02.2010
pawn Код:
stock GetPlayerNameEx(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
new str[MAX_PLAYER_NAME];
strmid(str, name, 0, strlen(name), MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if (str[i] == '_') str[i] = ' ';
}
return str;
}
I found it somewhere on this forum and just copy pasted it.
Re: How i can remove the "_" -
Mr.Dzx - 16.02.2010
Quote:
Originally Posted by SpiderPork
pawn Код:
stock GetPlayerNameEx(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); new str[MAX_PLAYER_NAME]; strmid(str, name, 0, strlen(name), MAX_PLAYER_NAME); for(new i = 0; i < MAX_PLAYER_NAME; i++) { if (str[i] == '_') str[i] = ' '; } return str; }
I found it somewhere on this forum and just copy pasted it.
|
Thank you very much,it works

.
Nice only one problem:
C:\Documents and Settings\Owner\Desktop\arp.pwn(20332) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Owner\Desktop\arp.pwn(20332) : warning 202: number of arguments does not match definition
Line 20332: GetPlayerNameEx(playerid, sendername, sizeof(sendername));
Re: How i can remove the "_" -
Correlli - 16.02.2010
You shouldn't use GetPlayerNameEx like GetPlayerName function. Just use it like
GetPlayerNameEx(playerid), ..
Re: How i can remove the "_" -
Mr.Dzx - 16.02.2010
Thank you guys
Re: How i can remove the "_" -
Mr.Dzx - 16.02.2010
Quote:
Originally Posted by Don Correlli
You shouldn't use GetPlayerNameEx like GetPlayerName function. Just use it like GetPlayerNameEx(playerid), ..
|
I used the GetPlayerNameEx(playerid); and then i tryed and it was like:
[ID:0] says: (Not Name_Name [ID:0] says
Re: How i can remove the "_" -
Mr.Dzx - 17.02.2010
Bring
My
Post
Up
Re: How i can remove the "_" -
Mr.Dzx - 18.02.2010
B
U
M
P