Teleport problem
#1

hi,

i made a code for my include but it says unknown command.
this is my code:
Код:
COMMAND:DM(playerid, params[])
{
    if (APlayerData[playerid][PlayerLevel] >= 1)
    SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
    SetPlayerInterior(playerid, 18);
    SendClientMessage(playerid, 0xFF0000FF, "Welcome to Warehouse 2");
	return 1;
}
please help me fixing this code
Reply
#2

pawn Код:
COMMAND:DM(playerid, params[])
{
    if(APlayerData[playerid][PlayerLevel] >= 1) // Your level.
    {
        SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
        SetPlayerInterior(playerid, 18);
        SendClientMessage(playerid, -1, "Welcome to Warehouse 2");
    }
    else
    {
        // What would happen if the condition is not fulfilled.
    }
    return 1;
}

If it is not it, check that it is not using 'ZCMD 'and 'OnPlayerCommandText' in the same script.


Regards.
Reply
#3

still not working.

and as i told i am using it a include.
is says: Unknown Command
Reply
#4

Maybe it's the admin level.
Try,
pawn Код:
COMMAND:DM(playerid, params[])
{
    SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
    SetPlayerInterior(playerid, 18);
    SendClientMessage(playerid, 0xFF0000FF, "Welcome to Warehouse 2");
    return 1;
}
Reply
#5

still not working
Reply
#6

I tested the command Derick gave you, it works for me.

pawn Код:
CMD:dm(playerid, params[])
{
    SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
    SetPlayerInterior(playerid, 18);
    SendClientMessage(playerid, 0xFF0000FF, "Welcome to Warehouse 2");
    return 1;
}
Reply
#7

Quote:
Originally Posted by thegamer355
Посмотреть сообщение
still not working
Are you using if(APlayerData[playerid][PlayerLevel] >= 1) inside the command?
Reply
#8

not atm i tried the code you gave me
Reply
#9

bump


still waiting for help
Reply
#10

did u typed on top of ur script this --
Код:
#include <zcmd>
?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)