how can i make a pickup and use it with getplayername - 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 can i make a pickup and use it with getplayername (
/showthread.php?tid=150565)
how can i make a pickup and use it with getplayername -
hardstop - 26.05.2010
i want like you got to have certain Firstname_Lastname to enter the house onplayerpickup
Re: how can i make a pickup and use it with getplayername -
[HiC]TheKiller - 26.05.2010
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.
Re: how can i make a pickup and use it with getplayername -
Conroy - 26.05.2010
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name, "_", true)) {
//Enter the house...
} else return 0;
Re: how can i make a pickup and use it with getplayername -
[HiC]TheKiller - 26.05.2010
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
Re: how can i make a pickup and use it with getplayername -
Conroy - 26.05.2010
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.