[Help] Simple /enter /exit Code
#1

Ive tryed to replace my current /enter /exit command at the moment its
C so when you press C you enter the building and the same for exit
i wanna change that to /enter and /exit but can't really make the code
so can anyone send the code?
Reply
#2

Ehm, go to OnPlayerKeyStateChange, look for KEY_CROUCH or 2, and copy the code you got there. Then put it to OnPlayerCommandText in a command check like the others that are there
Reply
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Ehm, go to OnPlayerKeyStateChange, look for KEY_CROUCH or 2, and copy the code you got there. Then put it to OnPlayerCommandText in a command check like the others that are there
Okay thanks for quick respond..
but i go to OnPlayerKeyStateChange and find KEY_CROUCH and i copy the code:

Код:
#define KEY_CROUCH				(2)
Is that the right code? and where do i replace the C to /enter and /exit Commands
Dont really understand sorry..
Reply
#4

please paste the code, where OnPlayerKeyStateChange is KEY_CROUCH function.
Reply
#5

Using this code now but is there a problem in the code?

Код:
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, 1772.4011,-1548.4357,9.9063) {
SetPlayerInterior(playerid, /10/);
SetPlayerPos(playerid, 1808.6891,-1312.6675,197.1969);
return 1;
}
}
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, 1810.3650,-1312.7653,197.1969) (
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1770.2963,-1546.3507,9.9260);
return 1;
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)