[HELP] - Automatic gates open only by specific players?!
#1

Hello guys..
well , im just a beginner and new for pawno etc.. i've finally done making automatic gates that opens with a (key)
but my next question is how can i make only a specific player can open it ..

the gate opens when u are without a vehicle with RightClick and when u are in a vehicle it opens with Space key.

i mean.. not everyone can open that gate. only the ones who i choose from Mysql or what ever..

NOTE : I'm Using MySQL system , not just normal files.
Reply
#2

Quote:
Originally Posted by Riven
Посмотреть сообщение
Hello guys..
well , im just a beginner and new for pawno etc.. i've finally done making automatic gates that opens with a (key)
but my next question is how can i make only a specific player can open it ..

the gate opens when u are without a vehicle with RightClick and when u are in a vehicle it opens with Space key.

i mean.. not everyone can open that gate. only the ones who i choose from Mysql or what ever..

NOTE : I'm Using MySQL system , not just normal files.
Do you have teams?
Reply
#3

well. no :3 , after i learn a little more , i would make teams .
Reply
#4

Add just a condition or just like
pawn Код:
if(/*the way you cheking the player pos && gTeam[playerid]=1 or 2....*/)
ex:
Код:
if(IsPlayerPos(playerid,x,y,z) && TheTeamThatCanUseTheKey)
&&= and.
Reply
#5

Use my include (mGates). Makes this so easy. See my signature.
Reply
#6

Well, use the only static unique thing players got; their name!

pawn Код:
string Name = "Tommy";

if(strcmp(getPlayerName(playerid, sizeof(name)), Name) == 0;
{
    // open gate
}
Probably not 100% Pawn correct, but idea should be clear.
Reply
#7

well guys .. you gave me nice tips for that , but what i mean is i have accounts in my MySQL database. isn't there a way to let it select the accounts for that or something? , thanks again : )
Reply
#8

pawn Код:
if(bla bla bla..)
You must enter a distinguishing feature
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)