Help me - 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: Help me (
/showthread.php?tid=267476)
Help me -
Gurjyot - 08.07.2011
Hello like i've a RP server i want my name to be "Joey" not "Joey_Owner" how can i do this?
If i set my name to Joey then log it says use Firstname_Lastname.
Re: Help me -
HayZatic - 08.07.2011
Show Me Your On Player Connect
Re: Help me -
WoodPecker - 08.07.2011
Post your OnPlayerConnect please so we can help you.
Re: Help me -
andruz99 - 08.07.2011
Go to your server folder open "scriptfiles" folder then "users" and find Joey_Owner, Change it to Joey_...Put here what you want... and rejoin and it works
or if you want that lastnames aren't used then remove this part. do as i say
ctrl + f - type in: public onplayerconnect
now look down until you see something like
Код:
new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration Department: Your name is not acceptable.");
SendClientMessage(playerid, COLOR_YELLOW2, "Hint: Your name must be in the format Firstname_Lastname.");
Kick(playerid);
return 1;
}
delete it, compile, restart server, run, Done
Re: Help me -
Shadoww5 - 09.07.2011
Hey guys, how can I make this:
Player's name is: Shadow_samp
So I want only the first name: Shadow.
Anybody knows make this code ?
Re: Help me -
SchurmanCQC - 09.07.2011
@Shadow, I think it's strtok
Re: Help me -
Shadoww5 - 09.07.2011
Forget .. I found this:
PHP код:
public split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc)){
if(strsrc[i]==delimiter || i==strlen(strsrc)){
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i+1;
aNum++;
}
i++;
}
return 1;
}