I am new to www.sa-mp.com -
$India$ - 20.08.2011
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.
Re: I am new to www.sa-mp.com -
=WoR=G4M3Ov3r - 20.08.2011
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
$
Re: I am new to www.sa-mp.com -
linuxthefish - 20.08.2011
Sorry, you have to have over 100 posts, and 2 reputation to start a RP server. Welcome to SA-MP though!
Re: I am new to www.sa-mp.com -
$India$ - 20.08.2011
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?
Re: I am new to www.sa-mp.com -
Lorenc_ - 20.08.2011
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.
Re: I am new to www.sa-mp.com -
$India$ - 20.08.2011
Its for removing "_"??
Re: I am new to www.sa-mp.com -
Kush - 20.08.2011
Quote:
Originally Posted by $India$
Its for removing "_"??
|
PHP Code:
stock GetPlayerRPName( playerid, name[ ], len )
{
GetPlayerName( playerid, name, len );
for(new i = 0; i < len; i++ )
{
if ( name[ i ] == '_' )
name[ i ] = ' ';
}
}
Re: I am new to www.sa-mp.com -
$India$ - 20.08.2011
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
Re: I am new to www.sa-mp.com -
Retardedwolf - 20.08.2011
Quote:
Originally Posted by $India$
I know Scripting
|
If you do, why do you need help with something easy?
Re: I am new to www.sa-mp.com -
$India$ - 20.08.2011
Because i am not so Good and please tell me to Fix Those Errors?