21.05.2018, 16:07
This is how you do it. Under the command called /enter, Check if the player is near a bank.
You can do this by using the function IsPlayerInRangeOfPoint();. The X, Y, Z coord of the function corresponds to the X, Y, Z coord of the bank entrance. Then under the if statement, Set the player pos and his interior.
A list of interior ids and location can be found here: CLICK ME
So in conclusion, Your code should look something like this.
You can do this by using the function IsPlayerInRangeOfPoint();. The X, Y, Z coord of the function corresponds to the X, Y, Z coord of the bank entrance. Then under the if statement, Set the player pos and his interior.
A list of interior ids and location can be found here: CLICK ME
So in conclusion, Your code should look something like this.
PHP код:
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, range, Float:x, Float:y, Float:z)) {
SetPlayerPos(playerid, Float:x, Float:y, Float:z);
SetPlayerInterior(playerid, interiorid);
}
return 1;
}