comando gethere error con ID 0 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: comando gethere error con ID 0 (
/showthread.php?tid=416562)
comando gethere error con ID 0 -
benjas09 - 17.02.2013
PHP код:
CMD:gethere(playerid,params[])
{
new id, id2, Float:x, Float:y, Float:z;
if(!IsPlayerAdmin(playerid)) return 0;
{
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: /gethere [playerID]");
GetPlayerPos(id2, x, y, z);
SetPlayerPos(id, x+1, y+1, z);
}
return 1;
}
Cuando pongo "/gethere 0" no pasa nada, pero si por ejemplo pongo "/gethere MI ID" me hace un GOTO al ID 0
Respuesta: comando gethere error con ID 0 -
OTACON - 17.02.2013
pawn Код:
CMD:gethere(playerid,params[])
{
new Float:x, Float:y, Float:z;
if(!IsPlayerAdmin(playerid)) {
if(sscanf(params,"d",params[0])) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: /gethere [playerID]");
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(params[0], x+1, y+1, z);
}
else {
SendClientMessage(playerid,COLOR_RED,"[ERROR]: Usted No es Administrador Rcon");
}
return 1;
}
Respuesta: comando gethere error con ID 0 -
benjas09 - 17.02.2013
El unico cambio es este
Код:
if(sscanf(params,"d",params[0])) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: /gethere [playerID]");
En que cambio la "u" en "d"??
Gracias.
Respuesta: comando gethere error con ID 0 -
JustBored - 17.02.2013
Quote:
Originally Posted by benjas09
El unico cambio es este
Код:
if(sscanf(params,"d",params[0])) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: /gethere [playerID]");
En que cambio la "u" en "d"??
Gracias.
|
Quй "u" es para usuarios/ids y "d" para nъmeros con decimales.
Respuesta: comando gethere error con ID 0 -
OTACON - 17.02.2013
CMD:gethere(playerid,params[])
{
new id, id2, Float
, Float:y, Float:z;
if(!IsPlayerAdmin(playerid)) return 0;
{
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: /gethere [playerID]");
GetPlayerPos(id2, x, y, z);
SetPlayerPos(id, x+1, y+1, z);
}
return 1;
}
Respuesta: comando gethere error con ID 0 -
benjas09 - 17.02.2013
Quote:
Originally Posted by bytytus
Код:
CMD:gethere(playerid,params[])
{
new id, id2, Float:x, Float:y, Float:z;
if(!IsPlayerAdmin(playerid)) return 0;
{
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: /gethere [playerID]");
GetPlayerPos(id2, x, y, z);
SetPlayerPos(id, x+1, y+1, z);
}
return 1;
}
|
Vi los cambios esos, pero queria saber que fue lo que cambio en cambiarlo a "d"