How to create a gate where only a person with a certain name can enter
#1

How can I create a gate where the gate opens only if the player has the name i put in the script?
Reply
#2

Код:
CMD:gate(playerid, params[])
{
	new name[24];
	GetPlayerName(playerid, name, sizeof name);
	if(strcmp(name, "nigga_please", true) == 0)
	{
		//code
	}
	return 1;
}
Reply
#3

I am actually changing the subject now...
How could you see if a player has a certain name (Original: How to create a gate where only a person with a certain name can enter)
Reply
#4

pawn Код:
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
if(!strcmp("GateOwner", Name, false))
{
    //stuff in here if the players name is GateOwner
}
Reply
#5

Thanks. I'll try it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)