how can i make a pickup and use it with getplayername
#1

i want like you got to have certain Firstname_Lastname to enter the house onplayerpickup
Reply
#2

Search for the FirstName_LastName function then do this
pawn Код:
new Pname[24];
GetPlayerName(playerid, Pname, 24);
if(/*Firstname_lastname check is wrong*/) return 0;
//Other stuff here.
Reply
#3

pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name, "_", true)) {
//Enter the house...
} else return 0;
Reply
#4

Quote:
Originally Posted by Conroy
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name, "_", true)) {
//Enter the house...
} else return 0;
That wouldn't work because someone could have a name

9g_u2399ngpqoi9
Reply
#5

It would still allow someone to go through the pickup with '_' in his name, and I know that's not a roleplay name, but who would register that kind of name? If they do, ingame admins can easily kick/ban or even offer a name change.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)