How to make gate permissions name only.
#1

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 ?
Reply
#2

check name before the command and if not the same return a message say you arent name_name
Reply
#3

https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/MoveObject
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)