Base help!
#1

Hello guys,

I've made a base for in my server
but i dont know how to add a command to open the doors

Example:
My name is: [UR]r3flex and only players of [UR] can open the door
by typing: /uropen /urclose
when they type: /uropen the way blockade goes down and they can drive into the base
and when they type /urclose the blockade goes up and no one can come in

I hope u understand it

Thanks!
Reply
#2

pawn Код:
stock PlayerNameStartsWith(playerid, const name[])
{
    if(IsPlayerConnected(playerid))
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        if(strfind(pName, name, true)==0)
        {
        return 1;
        }
    }
    return 0;
}
Use it as
pawn Код:
if (PlayerNameStartsWith(playerid, "[UR]"))
    {

    }
Reply
#3

Quote:
Originally Posted by dice7
pawn Код:
stock PlayerNameStartsWith(playerid, const name[])
{
    if(IsPlayerConnected(playerid))
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        if(strfind(name, name, true)==0)
        {
        return 1;
        }
    }
    return 0;
}
Use it as
pawn Код:
if (PlayerNameStartsWith(playerid, "[UR]"))
    {

    }
i am a noob so where do i have to add it and where do i have to put the commands?
Reply
#4

Also remember that when people make his nickname [UR].... they can always enter...
Reply
#5

Quote:
Originally Posted by pascallj
Also remember that when people make his nickname [UR].... they can always enter...
yeh but they need Permission to change their nickname and we have always admins online for unwanted visitors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)