Gates whose opens with player name
#1

Hello, i would like to know how to do this:
Make gates, which opens only if player name is written in script and player IG writes down command.

PS. Im sorry i cant write more in description, english isnt my native.. :/
Reply
#2

Just do something like this,
CMDpengate(playerid, params[])
{
// bla bla bla
new name[24];
GetPlayerName(playerid, name, 24);
if(!strcmp(name, "name_open", true))
{
// Open the gate here...
}
}


Basically, use strcmp to compare the name, and if it matches what you want it to open the gate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)