Poderiam me ajuda ?
#1

Boa Noite Meu Nome й Jean Gostaria que me ajudassem com o seguinte comando.


Um amigo me pediu ajuda e como nгo tenho experiencia com Pawn venho pedi ajuda aqui para vocкs bom vamos la.

Seguinte gostaria que me ajudassem com a seguinte Create Object Quando digitasse comando /arvore aparece 1 arvore na minha frente nгo precisa ser muito Longe do player nгo entendo muito dos sistemas mas acho que seria igual ao sistema de criar barreira em servidores de Rpg Claro deicho muito Obrigado deis de jб se nгo conseguirem me ajudar pelo menos tentaram lende esse texto enorme Obrigado.
Reply
#2

Olб Happy05!

Bom vou fazer um bбsico:

Junto com as suas news adicione:
pawn Код:
new pArvore[MAX_PLAYERS];
Junto com suas forward's adicione:
pawn Код:
forward RemoveArvore(playerid);
No public OnPlayerConnect adicione:
pawn Код:
pArvore[playerid] = 0;
No public OnPlayerDisconnect adicione:
pawn Код:
if(pArvore[playerid] != 0)
    {
        RemoveArvore(playerid);
    }
Junto com os seus comando adicione:

pawn Код:
if(strcmp(cmd, "/arvore", true)==0)
    {
        if (pArvore[playerid] != 0) return SendClientMessage(playerid, COLOR_GREY, "Vocк sу pode criar 1 бrvore por vez, /rarvore - para remover sua бrvore");
        new Float:X, Float:Y, Float:Z, Float:A;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, A);
        pArvore[playerid] = CreateObject(669, X, Y, Z, 0.0, 0.0, A+180);
        SetPlayerPos(playerid, X, Y, Z+4);
        GameTextForPlayer(playerid, "~w~Arvore ~r~Criada", 5000, 5);
        SendClientMessage(playerid, COLOR_GREEN, "Бrvore Implantada... Use /rarvore Para Remove-la!");
        return true;
    }

    if(strcmp(cmd, "/removerarvore", true)==0 || strcmp(cmd, "/rarvore", true)==0)
    {
        if (pArvore[playerid] != 0)
        {
            RemoveArvore(playerid);
            SendClientMessage(playerid, COLOR_GREY, "Vocк retirou a sua бrvore!");
        }
        else { return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo criou uma бrvore!"); }
        return true;
    }
No fim do gamemode adicione:
pawn Код:
public RemoveArvore(playerid)
{
    DestroyObject(pArvore[playerid]);
    pArvore[playerid] = 0;
}
Reply
#3

Muito Obrigado Amigo agradeзo vocк muito rs.
Reply
#4

Quote:
Originally Posted by Happy05
Посмотреть сообщение
Muito Obrigado Amigo agradeзo vocк muito rs.
Olб Happy05!

De nada estamos ai para isso!
Se puder da +rep!

Vlw!
Reply
#5

Amigo Desculpe Incomodar Novamente mas no meu Gamemode deu 4 Erros:

Compilando NUNC.pwn...
C:\Users\xXWesllyxX.xXWesllyxX-PC\Desktop\NUNC.pwn(1500) : error 003: declaration of a local variable must appear in a compound block

C:\Users\xXWesllyxX.xXWesllyxX-PC\Desktop\NUNC.pwn(1500) : warning 221: label name "Float" shadows tag name
C:\Users\xXWesllyxX.xXWesllyxX-PC\Desktop\NUNC.pwn(1500) : error 017: undefined symbol "X"
C:\Users\xXWesllyxX.xXWesllyxX-PC\Desktop\NUNC.pwn(1500) : warning 221: label name "Float" shadows tag name
C:\Users\xXWesllyxX.xXWesllyxX-PC\Desktop\NUNC.pwn(1500) : error 017: undefined symbol "Y"
C:\Users\xXWesllyxX.xXWesllyxX-PC\Desktop\NUNC.pwn(1500) : fatal error 107: too many error messages on one line

Compilation aborted.
Compilation aborted.Pawn compiler 3.2.3664 Copyright (coffee) 1997-2006, ITB CompuPhase
Reply
#6

Olб Happy05!

Peзo que coloque os cуdigo entre [pawn*][/pawn*] (Sem os *) e me mande a linha 1500 do seu gamemode

Vlw!
Reply
#7

sou o amigo dele
aqui a linha do do erro:

new Float:X, Float:Y, Float:Z, Float:A;
Reply
#8

Olб Weslly Stronda!

Nгo sei se estou correto, porйm acho que vocк deve atualizar suas includes e/ou adicionar a include "#include float"

Vlw!
Reply
#9

Ok NutShot Vou faser aki e irei mandar a Linha
Se puder me adicione no skype porfavor.

Skype>>jeancarlosmergen

Minha foto й do Anime naruto. in skype
Reply
#10

Olб Happy05!

Estou sem Skype no momento.

Vlw!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)