[AJUDA]Move Objets
#1

Galera Tipo Criei Uma Base Admin No Meu GM .. Ai Tem O Portao Ele Deveria Abrir E Fechar Com O Comando ..

O Comando Que Criei E Assim :

------------------------------------------------------------------------------------------------

if (strcmp("/fechar-tpd", cmdtext, true, 10) == 0) {
{
MoveObject(980, -309.31048583984, 1322.5321044922, 56.019676208496, 0);
SendClientMessage(playerid, 0xF60000AA, "Portao Estб Fechando.");
return 1;
}
if (strcmp("/abrir-tpd", cmdtext, true, 10) == 0) {
{
MoveObject(980, -309.31048583984, 1322.5321044922, 50.269676208496, 0);
SendClientMessage(playerid, 0xF60000AA, "Portao Estб Abrindo.");
return 1;
}

------------------------------------------------------------------------------------------------

Apareceu 1 Error :

D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(855) : warning 225: unreachable code
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(864) : warning 225: unreachable code
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(961) : error 030: compound statement not closed at the end of file (started at line 850)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

------------------------------------------------------------------------------------------------

Como Resolver .. ? Obrigado Geral Que Me Ajuda
Reply
#2

pawn Code:
if (strcmp("/fechar-tpd", cmdtext, true, 10) == 0) {//tira essa chave
{
MoveObject(980, -309.31048583984, 1322.5321044922, 56.019676208496, 0);
SendClientMessage(playerid, 0xF60000AA, "Portao Estб Fechando.");
return 1;
}
if (strcmp("/abrir-tpd", cmdtext, true, 10) == 0) {//tira essa chave
{
MoveObject(980, -309.31048583984, 1322.5321044922, 50.269676208496, 0);
SendClientMessage(playerid, 0xF60000AA, "Portao Estб Abrindo.");
return 1;
}
E dб prуxima vez que postar, utilize [*pawn] no inнcio do code, e [*/*pawn] no fim do code (sem asterнstico). Se nгo funcionar posta aqui.
Reply
#3

no topo do gm:
pawn Code:
//
new portao1;
No public ongamemodeInt:
pawn Code:
//
public OnGameModeInit()
{
portao1 = CreateObject(980, -309.31048583984, 1322.5321044922, 56.019676208496, 0);
return 1;
}
no public OnPlayerCommandText
pawn Code:
//
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fechar-tpd", cmdtext, true, 10) == 0)
    {
        MoveObject(portao1, -309.31048583984, 1322.5321044922, 56.019676208496, 2.0);
        SendClientMessage(playerid, 0xF60000AA, "Portao Estб Fechando.");
        return 1;
    }
    if (strcmp("/abrir-tpd", cmdtext, true, 10) == 0)
    {
        MoveObject(portao1, -309.31048583984, 1322.5321044922, 50.269676208496, 2.0);
        SendClientMessage(playerid, 0xF60000AA, "Portao Estб Abrindo.");
        return 1;
    }
}
Espero ter ajudado
Reply
#4

vlw mathues ... Maiiis Tipo Como Pega Coordenada Do Portao Aberto E Fechado ? Pq Nгo Foi Quando Cheguei Ao Local O Portao Nгo Estava Lб ... Tudo Estava Menos Ele ...

Como Pegar a Coordenada Correta Do Portao Fechado E Aberto ?
Reply
#5

4 Errors Segio =/

Fiz Do Seu Geito Pq No Do Matheus Nгo Deu ..

D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(29) : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(29) : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(32) : error 055: start of function body without function header
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(36) : error 010: invalid function or declaration
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(853) : error 029: invalid expression, assumed zero
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(853) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

o meu deu?
Reply
#7

Nгo Sergioo =/

D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(30) : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(30) : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(33) : error 055: start of function body without function header
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(37) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

https://sampwiki.blast.hk/wiki/MoveObject

nem diigo nada --'.
Reply
#9

Cara Eu Fiz O Que Ta No Wiki Mais A Porra Das Coordenas Deve Tar Errada Intaum *-*
Reply
#10

Fiz Tudo Denovo

Apareceu Isso :

D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(3 : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(3 : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(41) : warning 225: unreachable code
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(42) : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(42) : warning 202: number of arguments does not match definition
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(47) : warning 225: unreachable code
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(97 : error 030: compound statement not closed at the end of file (started at line 225)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#11

1- MoveObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ); -- Assim й o cуdigo --

2- Faz assim: if(!strcmp("/fechar-tpd",cmdtext)) { e if(!strcmp("/abrir-tpd",cmdtext)) {
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)