[AJUDA] /goto
#4

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Isto deve resolver o seu problema :


Adaptei pra vocк :


pawn Код:
if(strcmp(cmd, "/goto", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_DBLUE, "Uso correto: /goto [id do player]");
            return 1;
        }
        new Float:plocx,Float:plocy,Float:plocz;
        giveplayerid = strval(tmp);
        if(logged[playerid] == 1)
        {
            if(IsPlayerConnected(giveplayerid))
            {
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                new PlayerName[30];
                GetPlayerName(playerid, PlayerName, 30);
                format(string, sizeof(string), "Vocк se teleportou para %s(%i).", giveplayer, giveplayerid);
                SendClientMessage(playerid, COLOR_BLUE, string);
                GetPlayerPos(giveplayerid, plocx, plocy, plocz);
                new intid = GetPlayerInterior(giveplayerid);
                SetPlayerInterior(playerid,intid);
                printf("[Command] %s usou /goto para se teleportar para %s.", PlayerName, giveplayer);
                if (GetPlayerState(playerid) == 2)
                {
                    new tmpcar = GetPlayerVehicleID(playerid);
                    SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                }
                else
                {
                    SetPlayerPos(playerid,plocx,plocy+2, plocz);
                }
            }
            else
            {
                format(string, sizeof(string), "%d nгo й um player ativo!", giveplayerid);
                SendClientMessage(playerid, COLOR_RED, string);
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "Vocк tem que estar logado para usar este comando!");
        }
        return 1;
    }


Espero ter ajudado .
Deu esse erro vei:
pawn Код:
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4469) : error 017: undefined symbol "logged"
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4469) : warning 215: expression has no effect
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4469) : error 001: expected token: ";", but found "]"
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4469) : error 029: invalid expression, assumed zero
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4469) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
linha:

Код:
 if(logged[playerid] == 1)
Daн tirei o cуdigo do erro e deu esse:

pawn Код:
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4475) : error 017: undefined symbol "string"
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4475) : error 017: undefined symbol "string"
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4475) : error 029: invalid expression, assumed zero
C:\Users\Jefferson Gomes\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4475) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
linha:
Код:
format(string, sizeof(string), "Vocк se teleportou para %s(%i).", giveplayer, giveplayerid);
Ajuda
Reply


Messages In This Thread
[AJUDA] /goto - by .CrazZy._.[De] - 14.11.2011, 20:16
Re: [AJUDA] /goto - by Mteck - 14.11.2011, 20:18
Re: [AJUDA] /goto - by rjjj - 14.11.2011, 20:19
Re: [AJUDA] /goto - by .CrazZy._.[De] - 14.11.2011, 20:31
Re: [AJUDA] /goto - by Mteck - 14.11.2011, 20:38
Re: [AJUDA] /goto - by rjjj - 14.11.2011, 22:07
Re: [AJUDA] /goto - by .CrazZy._.[De] - 15.11.2011, 02:20

Forum Jump:


Users browsing this thread: 1 Guest(s)