DCMD Help
#1

How I can use this on DCMD?
Reply
#2

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK) dcmd_exit(playerid, "");
if(newkeys & KEY_SECONDARY_ATTACK) dcmd_enter(playerid, "");
Put in between the " here " the parameters, if there are any (params).

Jeffry
Reply
#3

Errors:
Код:
error 017: undefined symbol "dcmd_exit"
error 017: undefined symbol "dcmd_enter"
The commands is:
Код:
command(enter, playerid, params[])
{
	if (PlayerToPoint(4, playerid,2398.0857,133.0009,28.3789))
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2397.8286,130.2117,70.8653);
	}
	if (PlayerToPoint(4, playerid,1292.6390,380.1429,21.4683))
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1291.5057,382.6552,63.9558);
	}
	return 1;
}

command(exit, playerid, params[])
{
	if (PlayerToPoint(4, playerid,2397.8286,130.2117,70.8653))
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2398.0857,133.0009,28.3789);
	}
	if (PlayerToPoint(4, playerid,1291.5057,382.6552,63.9558))
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1292.6390,380.1429,21.4683);
	}
	return 1;
}
Reply
#4

That's not dcmd, is it?

Never worked with such a system you have, but try:

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK) command(exit, playerid, "");
if(newkeys & KEY_SECONDARY_ATTACK) command(enter, playerid, "");

Jeffry
Reply
#5

That code is zcmd. This should work:

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK) cmd_exit(playerid, "");
if(newkeys & KEY_SECONDARY_ATTACK) cmd_enter(playerid, "");
...I gave you the working code, if you don't read this then you're a fool.

EDIT: It should be pointed out that this code will exit a building you're in if you hit 'KEY_SECONDARY_ATTACK' and then enter it again.
Reply
#6

Still not working but nevermind.
Thanks anyway...
Reply
#7

Or you just place everything of the command under the 'if' statements. This will work for sure then. ^^
Reply
#8

Can you explain?
Reply
#9

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
    //All in one ^^
    if (PlayerToPoint(4, playerid,2397.8286,130.2117,70.8653))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,2398.0857,133.0009,28.3789);
    }
    if (PlayerToPoint(4, playerid,1291.5057,382.6552,63.9558))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,1292.6390,380.1429,21.4683);
    }
    if (PlayerToPoint(4, playerid,2398.0857,133.0009,28.3789))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,2397.8286,130.2117,70.8653);
    }
    if (PlayerToPoint(4, playerid,1292.6390,380.1429,21.4683))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,1291.5057,382.6552,63.9558);
    }
    return 1;
}
Jeffry
Reply
#10

Okay, Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)