SA-MP Forums Archive
Teleport problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Teleport problem (/showthread.php?tid=491156)



Teleport problem - thegamer355 - 29.01.2014

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


Respuesta: Teleport problem - Swedky - 29.01.2014

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.



Re: Teleport problem - thegamer355 - 29.01.2014

still not working.

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


Re: Teleport problem - DerickClark - 29.01.2014

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;
}



Re: Teleport problem - thegamer355 - 29.01.2014

still not working


Re: Teleport problem - TLN - 29.01.2014

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;
}



Re: Teleport problem - DerickClark - 29.01.2014

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


Re: Teleport problem - thegamer355 - 29.01.2014

not atm i tried the code you gave me


Re: Teleport problem - thegamer355 - 31.01.2014

bump


still waiting for help


Re: Teleport problem - BroZeus - 31.01.2014

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