[DUDA] Comando teleport -
catclan - 20.05.2014
Hola, quiero crear un comando para teletransportarme, he usado una guia, pero me da errores, ese es el comando:
public OnPlayerCommandText(playerid, cmdtext[])
if (strcmp("/lavanderia", cmdtext, true) == 1)
{
SetPlayerPos(playerid, 1838.5548,-1417.4011,13.5625, 12.0);
return 1;
}
Y esos con los errores:
(3

: warning 202: number of arguments does not match definition
(45) : warning 209: function "OnPlayerCommandText" should return a value
Lнnea 38: SetPlayerPos(playerid, 1838.5548,-1417.4011,13.5625, 12.0);
Lнnea 45: No hay ._.
Faltaria decir que lo quiero hacer en FIlterScript, muchas gracias.
Respuesta: [DUDA] Comando teleport -
Whyd - 20.05.2014
Quote:
Originally Posted by catclan
SetPlayerPos(playerid, 1838.5548,-1417.4011,13.5625, 12.0);
|
El "
, 12.0" te sobra ya que SetPlayerPos solo tiene para usar
x, y, z y no бngulos.
Para el angulo puedes usar
https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lavanderia", cmdtext, true) == 1)
{
SetPlayerPos(playerid, 1838.5548,-1417.4011,13.5625);
return 1;
}
return 0;
}
Aquн asegurate principalmente en la callback que de
return 0. y en tus comandos
return 1;
Re: [DUDA] Comando teleport -
catclan - 21.05.2014
Muchas gracias, ya me funciona!