[HELP] return cmd_enter and cmd_exit with a key ?
#8

You set a variable for all players, tracking the interior they've entered.

Upon entering you can set it to the interior they entered, and with this, you can also check whether they are outside.

This will go hand in hand with the initial check you should be doing instead of having the 2 returns.

Код:
new InteriorIDforPlayer[MAX_PLAYERS];

if(InteriorIDforPlayer[playerid]){return cmd_exit(playerid,"");} //If anything higher than 0, it will return true
else return cmd_enter(playerid, ""); // else it will /enter
This isn't tested at all and you will need to work with it, but that's the "idea" of it.

You will want to learn some if statement and return information though in this, as I am sure this code will be buggered, but it is simply to show the concept of using the variable to track the player interior status.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)