Obtener la posicion de un jugador por su ID
#1

Hola a todos y todas , hoy queria saber si me pueden ayudar en una pequeсa cosita.. Quisiera crear un comando con la cual obtener la posicion de un jugar mediante su id, por ejemplo

"/cor 0", entonces te diria en el chat sus cordenadas, y te marcara un checkpoint hacer posible, muchas gracias de antemano , y tambien quiero un cafesito xd
Reply
#2

Код:
CMD:coor(playerid, params[]) //Deberias usar ZCMD
{
new player;
if (!sscanf(params, "u", player)) //Deberias usar SSCANF
{
     new Float:x, Float:y, Float:z, string[100];;
     GetPlayerPos(player, x, y, z);
     format(string, sizeof(string), "ID Player= %i, X= %f, Y= %f, Z= %f", player, x, y, z);
     SendClientMessage(playerid,-1,string);
     SetPlayerCheckpoint(playerid, x, y, z, 5.0);
}
else SendClientMessage(playerid, -1, "USO: /coor [ID]");
return 1;
}
Espero ayudarte, cualquier cosa avisame. Te recuerdo que deberias usar ZCMD y SSCANF, si no te va a dar errores.
PD: Lo resalto asi lo lees xd
Reply
#3

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
Код:
CMD:coor(playerid, params[]) //Deberias usar ZCMD
{
new player;
if (!sscanf(params, "u", player)) //Deberias usar SSCANF
{
     new Float:x, Float:y, Float:z, string[100];;
     GetPlayerPos(player, x, y, z);
     format(string, sizeof(string), "ID Player= %i, X= %f, Y= %f, Z= %f", player, x, y, z);
     SendClientMessage(playerid,-1,string);
     SetPlayerCheckpoint(playerid, x, y, z, 5.0);
}
else SendClientMessage(playerid, -1, "USO: /coor [ID]");
return 1;
}
Espero ayudarte, cualquier cosa avisame. Te recuerdo que deberias usar ZCMD y SSCANF, si no te va a dar errores.
PD: Lo resalto asi lo lees xd
Oye me salieron algunos warnings :c

Код:
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(337) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(356) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(375) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(397) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(419) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(438) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(457) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(476) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\streamer.inc(495) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\foreach.inc(459) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\foreach.inc(667) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\zcmd.inc(83) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\sscanf2.inc(148) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\sscanf2.inc(166) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\sscanf2.inc(171) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\sscanf2.inc(182) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\sscanf2.inc(199) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\sscanf2.inc(204) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(82) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(101) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(108) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(116) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(133) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(154) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(170) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(189) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(205) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(219) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(281) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(299) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(325) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(371) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(381) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(416) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(448) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\msel.inc(489) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\a_zones.inc(417) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\a_zones.inc(441) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\pawno\include\a_zones.inc(464) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(842) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(853) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(864) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(875) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(887) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2203) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2213) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2248) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2451) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2468) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2474) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2489) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2506) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2524) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2534) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2552) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2570) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2645) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2661) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2676) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2691) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2704) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2717) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2731) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2746) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2752) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2760) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2767) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2772) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2789) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2804) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2812) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2828) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2917) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(2968) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3039) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3086) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3115) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3155) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3174) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3186) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3200) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3226) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3243) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3265) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3310) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3339) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3350) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3364) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3385) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3413) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3420) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3436) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3450) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3456) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3478) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3485) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3497) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3531) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3545) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3552) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3560) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3592) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3682) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3686) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3716) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3757) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(3777) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4132) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4204) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4218) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4228) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4336) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4390) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4423) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4428) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4455) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4482) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4493) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4506) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4519) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4576) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4589) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4615) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4671) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4683) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4698) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4729) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4741) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4756) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4770) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\JONATAN\Desktop\diego\Union Latina Desde 0 By Edinson Walker\gamemodes\UL-RP.pwn(4784) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           6684 bytes
Code size:           425608 bytes
Data size:          1873084 bytes
Stack/heap size:      16384 bytes; estimated max. usage=2768 cells (11072 bytes)
Total requirements: 2321760 bytes

131 Warnings.
Ah y por cierto, es obvio que todos somos humanos y nos equivocamos, aqui te corrijo un error por si algun user necesita esta informacion no le salga el error.

Код:
new Float:x, Float:y, Float:z, string[100];;
En esta parte al compilar te da 1 error, pero esto sucede porque terminaste con ";;" :v, cuando deberia ser ssolo ";". Oye porfavor ayudame con los warnings u.u, y gracias :3

PD: Aсado que el comando va de maravilla :3
Reply
#4

El comando que te pasaron es errуneo, sscanf estб mal usado y no hace falta hacer una variable mбs (para esto estб params).

Probб este (no lo probй):

pawn Код:
CMD:coord(playerid, params[])
{
    if(!sscanf(params, "d", params[0]))
    {
        if(IsPlayerConnected(params[0]))
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(params[0], X,Y,Z);
        }
        //Id invбlida, jugador desconectado
    }
    //Mal uso del comando
    return 1;
}
Tambiйn si quieres puedes agregarle el interior y el virtual world poniendo esto abajo del GetPlayerPos:

pawn Код:
new interior = GetPlayerInterior(params[0]);
new virtualworld = GetPlayerVirtualWorld(params[0]);
Saludos!
Reply
#5

Jaja vale, muchas gracias Goncho :3
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)