SA-MP Forums Archive
[Ajuda] Comando de Salvar Posicao - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando de Salvar Posicao (/showthread.php?tid=458213)



Comando de Salvar Posicao - 8235Danilo - 15.08.2013

Galera, fiz esse comando:

pawn Код:
if (strcmp("/savepos", cmdtext, true, 10) == 0)
    {
        new float:PosX;
        new float:PosY;
        new float:PosZ;
        GetPlayerPos(playerid, PosX, PosY, PosZ);
        SendClientMessage(playerid, -1, "Sua posicao e: %f, %f, %f", PosX, PosY, PosZ);
        return 1;
    }
mas da esses erros:

pawn Код:
H:\Server TDM\gamemodes\teste.pwn(176) : warning 213: tag mismatch
H:\Server TDM\gamemodes\teste.pwn(176) : warning 213: tag mismatch
H:\Server TDM\gamemodes\teste.pwn(176) : warning 213: tag mismatch
H:\Server TDM\gamemodes\teste.pwn(177) : warning 202: number of arguments does not match definition
H:\Server TDM\gamemodes\teste.pwn(177) : warning 202: number of arguments does not match definition
H:\Server TDM\gamemodes\teste.pwn(177) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Warnings.
O que faco? Qm ajudar +REP


Re: Comando de Salvar Posicao - XxFaTaLxX - 15.08.2013

pawn Код:
if(strcmp(cmd, "/savepos", true) == 0)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    format(gstring,sizeof(gstring),"Sua posiзгo, X:%f Y:%f Z:%f",X,Y,Z);
    SendClientMessage(playerid,-1,gstring);
    return 1;
}



Re: Comando de Salvar Posicao - darkxdll - 15.08.2013

pawn Код:
float
No Pawno й uma funзгo , mais sobre ela : https://sampwiki.blast.hk/wiki/Float

pawn Код:
Float
significa que vocк estб definindo que a variбvel й Flutuante , nъmeros com " . " (ponto).
Exemplo :
pawn Код:
new Float:LOL;

LOL = 50.86;



Re: Comando de Salvar Posicao - PT - 15.08.2013

quando vi o titulo pensei que vc queria salvar as cordenadas, em DOF2, dini, sei la..