zGaming help
#1

I need to know how I can set my doors and stuff that I use /enter and /exit to press F or ENTER.
Let me know ASAP thanks.
Reply
#2

First Find:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
and add this:
Код:
f( newkeys == KEY_SECONDARY_ATTACK ) //  KEY_SECONDARY_ATTACK if player fres F
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, X enter, Y enter, Z enter ) ) // if player to point
{
SetPlayerPos( playerid, X, r, Z ); // X, Y, Z -where player is gonna to spawn
SetPlayerInterior( playerid, 15 ); // ID of int
GameTextForPlayer( playerid, "TEXT", 3000, 1 ); // send player message
return 1; 
}
}
and add this afther when u added first(this now is for exit):
Код:
if( newkeys == KEY_SECONDARY_ATTACK ) // if player press F or enter
{
if( IsPlayerInRangeOfPoint( playerid, 3.0,  x exit, y ext, z exit ) ) // if player to point 
SetPlayerPos( playerid, X, Y, Z ); // pos where player is gonna to spawn
SetPlayerInterior( playerid, 0); //DI int...
GameTextForPlayer( playerid, "TEXT", 3000, 1 ); // TEXT
return 1; 
}
}
and also u can add TextLabels:

first find:
Код:
public OnGameModeInit()
and add: [CODE]Create3DTextLabel("For Enter to the buidling | press Enter",COLOR, x, y, z); // x,y,z enter
Create3DTextLabel("For Exit | press Enter",COLOR, x, y, z); //x,y,z exit
Reply
#3

Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)