I am new to www.sa-mp.com
#1

Hello,

Well first of all my Intro.

I live in India and i am an Indian. I am making a new Server, I know Scripting but need a person to join and make a Server with me and script together.

Well i want that, How can we remove the "_" from Names and How can we get the First name of the Person Only in Some things. Please help me.

Sorry For my Bad English.
Reply
#2

wiki.sa-mp.com, Teaches you everything you need to know about the basics.. etc

About someone scripting with/for you, You won't find that unless you got $
Reply
#3

Sorry, you have to have over 100 posts, and 2 reputation to start a RP server. Welcome to SA-MP though!
Reply
#4

But i know Scripting but i am not a Professtional in it. And can you tell me how to Remove the "_" from Names?

And how to get only First name?
Reply
#5

pawn Code:
stock strreplacechar(string[], oldchar, newchar)
{
    new matches;
    if(ispacked(string)) {
        if(newchar == '\0') {
            for(new i; string{i} != '\0'; i++) {
                if(string{i} == oldchar) {
                    strdel(string, i, i + 1);
                    matches++;
                }
            }
        } else {
            for(new i; string{i} != '\0'; i++) {
                if(string{i} == oldchar) {
                    string{i} = newchar;
                    matches++;
                }
            }
        }
    } else {
        if(newchar == '\0') {
            for(new i; string[i] != '\0'; i++) {
                if(string[i] == oldchar) {
                    strdel(string, i, i + 1);
                    matches++;
                }
            }
        } else {
            for(new i; string[i] != '\0'; i++) {
                if(string[i] == oldchar) {
                    string[i] = newchar;
                    matches++;
                }
            }
        }
    }
    return matches;
}
To be used:

pawn Code:
strreplacechar(playername, '_', ' ');
Very useful Util.
Reply
#6

Its for removing "_"??
Reply
#7

Quote:
Originally Posted by $India$
View Post
Its for removing "_"??
PHP Code:
stock GetPlayerRPNameplayeridname[ ], len )
{
    
GetPlayerNameplayeridnamelen );
    for(new 
0leni++ )
    {
        if ( 
name] == '_' )
        
name] = ' ';
    }

Reply
#8

Code:

F:\My Server\Server\gamemodes\Gamemode.pwn(240) : error 029: invalid expression, assumed zero
F:\My Server\Server\gamemodes\Gamemode.pwn(614) : warning 209: function "GetPlayerRPName" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I am getting these errors
Reply
#9

Quote:
Originally Posted by $India$
View Post
I know Scripting


If you do, why do you need help with something easy?
Reply
#10

Because i am not so Good and please tell me to Fix Those Errors?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)