[Ajuda]Portao Automatico
#1

Jб vi tutorial e tudo, mas ta dando erros.



O codigo й esse:

pawn Код:
//new e forward
new PortaoBallas;
forward PortaoBallas();

//OnGameModeInit
SetTimer("PortaoBallas", 200, true);

//objeto definido no OnGameModeInit
PortaoBallas = CreateObject(980, 2165.1608886719, -1135.7752685547, 27.127239227295, 0, 0, 269.99996948242);

//Public
public PortaoBallas() { //nome do forward
for(new i=0; i
if( gTeam[i] == time_balla) { //esse gteam й a array que usei para setar a gang e time_ballas й o id da gang
if(PlayerToPoint(15, i,2165.1608886719, -1135.7752685547, 27.127239227295)) { //o 15 й o raio que o player tem que ficar para abrir o portгo, depois do i sгo as coordenadas do portгo fexado, a mesma do create object
MoveObject(PortaoBallas, 2163.6125488281, -1141.2938232422, 26.861921310425, 2); // funзгo para mover o objeto, nesse exemplo faremos o portгo subir para cima, no eixo Z que й a ultima coordenada(20.547) e o 2 й a velocidade que ele vai se mover
} else {
MoveObject(PortaoBallas,2165.1608886719, -1135.7752685547, 27.127239227295, 2); //se o player se afastar do portгo atй nгo estar mais no raio, o portгo vai se mover para baixo(eixo Z, coordenada 12.547)
}
}
}
}

//stock no fim
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) {
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x); tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx <> -radi)) && ((tempposy <> -radi)) && ((tempposz <> -radi))) {
return 1;
}
return 0;
}

Alguem pode me ajudar?
Os erros sao esses
Код:
C:\Documents and Settings\Adelar\Desktop\Eduardo\samp03csvr_R2-2_win32\gamemodes\sb1.pwn(6181) : error 021: symbol already defined: "PortaoBallas"
C:\Documents and Settings\Adelar\Desktop\Eduardo\samp03csvr_R2-2_win32\gamemodes\sb1.pwn(6182) : error 010: invalid function or declaration
C:\Documents and Settings\Adelar\Desktop\Eduardo\samp03csvr_R2-2_win32\gamemodes\sb1.pwn(6183) : error 010: invalid function or declaration
C:\Documents and Settings\Adelar\Desktop\Eduardo\samp03csvr_R2-2_win32\gamemodes\sb1.pwn(6184) : error 010: invalid function or declaration
C:\Documents and Settings\Adelar\Desktop\Eduardo\samp03csvr_R2-2_win32\gamemodes\sb1.pwn(6186) : error 010: invalid function or declaration
C:\Documents and Settings\Adelar\Desktop\Eduardo\samp03csvr_R2-2_win32\gamemodes\sb1.pwn(160) : error 021: symbol already defined: "PortaoBallas"
E as linhas:
pawn Код:
public PortaoBallas() { //linha 6181
for(new i=0; i //6182
if( gTeam[i] == time_balla) { //6183
if(PlayerToPoint(15, i,2165.1608886719, -1135.7752685547, 27.127239227295)) { //6184
MoveObject(PortaoBallas, 2163.6125488281, -1141.2938232422, 26.861921310425, 2); // 6185
} else { //6186
//
forward PortaoBallas();//160
Alguem ajuda
?
Reply


Messages In This Thread
[Ajuda]Portao Automatico - by Keiichi - 04.06.2011, 21:19
Re: [Ajuda]Portao Automatico - by Shadoww5 - 04.06.2011, 21:37
Re: [Ajuda]Portao Automatico - by Keiichi - 04.06.2011, 21:46
Re: [Ajuda]Portao Automatico - by Keiichi - 04.06.2011, 21:48
Re: [Ajuda]Portao Automatico - by TiagoPS - 04.06.2011, 21:56
Re: [Ajuda]Portao Automatico - by Keiichi - 04.06.2011, 22:12
Re: [Ajuda]Portao Automatico - by Keiichi - 04.06.2011, 22:14
Re: [Ajuda]Portao Automatico - by Shadoww5 - 04.06.2011, 22:44
Re: [Ajuda]Portao Automatico - by Keiichi - 06.06.2011, 21:30
Re: [Ajuda]Portao Automatico - by [AF]Junior - 06.06.2011, 21:51

Forum Jump:


Users browsing this thread: 3 Guest(s)