How to make gate permissions name only. - 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 to make gate permissions name only. (
/showthread.php?tid=244959)
How to make gate permissions name only. -
Sensitive - 29.03.2011
Hello.
I wanted to ask that...
I made a house with gate, but i want only a player name can open it, like: Name_Name, so only the Name_Name can open the gate.
Can you help me guys ?
Re: How to make gate permissions name only. -
iJumbo - 29.03.2011
check name before the command and if not the same return a message say you arent name_name
Re: How to make gate permissions name only. - XFlawless - 29.03.2011
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/MoveObject
Re: How to make gate permissions name only. -
HyperZ - 29.03.2011
You can use this command:
pawn Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
new pName[64];
GetPlayerName(playerid,pName,64);
if(!strcmp(pName,"Name_Name",true)) // Change Name_Name to your name.
{
// Do something here.
}
return 0;
}
And for gate check this:
https://sampwiki.blast.hk/wiki/MoveObject