How to make gate wich just one player can open?
#1

Hello to all, i know to make gate wich can open team or organisation, but how to done gate wich just one player can open. For ex. player Oliver_Ben can open that gate and noone else?
Reply
#2

http://forum.sa-mp.com/index.php?topic=73014.0
Quote:

<> Commands & Function <>

- There is only one function you can use of this include:

> AddAutoGate(modelid,Float:cX,Float:cY,Float:cZ,Flo at:rX,Float:rY,Float:rZ,FloatX,FloatY,FloatZ ,namecanenter[24],open_distance)

modelid - objectid
cX - closedgate X coord
cY - closedgate Y coord
cZ - closedgate Z coord
rX - rotation X coord
rY - rotation Y coord
rZ - rotation Z coord
oX - opengate X coord
oY - opengate Y coord
oZ - opengate Z coord
namecanenter - Full or Part of the PlayerName of the Player/Clan that can enter
open_distance - radius, in which a player has to be that the gate opens

Reply
#3

pawn Код:
new pName[MAX_PLAYER_NAME];
pawn Код:
pName = GetPlayerName(playerid);
Then just make an if statement checking if the person doing the command is the players name.
Reply
#4

Quote:
Originally Posted by retart441
pawn Код:
new pName[MAX_PLAYER_NAME];
pawn Код:
pName = GetPlayerName(playerid);
Then just make an if statement checking if the person doing the command is the players name.
i know where i need to put new pName...
but where i need to put pName = GetPlayerName(playerid); is that i need to put in name of if(PlayerInfo[playerid] == 5)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)