[Ajuda] Nгo move o portгo
#1

Vim aqui a pedido de ajuda do meu amigo Ivan_Mota
ele pediu pra eu pedir ajuda a pedido dele, vamos lб!
Eu vi aqui no fs tudo certin que ele mandou e tals, sу que a HQ nгo ta abrindo os portхes, nao move de jeito nenhum, tipo da a mensagem NVC Abrindo o portгo! sу q nao abre!

pawn Код:
#include <a_samp>

/*******************************************************************************
*                         <=[Cores E Defines]=>                                *
*******************************************************************************/

#define COR_VerdeExercito 0x9ACD32AA
#define COR_Cinza 0xAFAFAFAA
#define COR_VerdeClaro 0x81F628AA
#define COR_Amarelo 0xFFFF00AA
#define COR_AzulClaro 0x33CCFFAA
#define COR_Azul 0x0050F6AA
#define COR_Verde 0x33AA33AA
#define COR_VermelhoEscuro 0xF60000AA
#define COR_Laranja 0xFF9900AA
#define COR_VermelhoClaro 0xF60000AA
#define COR_Branco 0xFFFFFFFF
#define COR_Preto 0x000000AA

/*******************************************************************************
*                                 <=[News]=>                                   *
*******************************************************************************/

new p1;
new p2;
new p3;

main()
{
    print("\n----------------------------------");
    print("  HQ [F.A]-Feito por Ivan_Mota      ");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
    CreateObject(987,787.40002441,-1309.90002441,13.39999962,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (1)
    CreateObject(987,787.29998779,-1298.00000000,13.30000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (2)
    CreateObject(987,775.40002441,-1309.90002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
    CreateObject(987,764.59997559,-1309.69995117,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
    CreateObject(987,752.79998779,-1309.50000000,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5)
    CreateObject(987,740.79998779,-1309.40002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (6)
    CreateObject(987,728.70001221,-1309.50000000,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (7)
    CreateObject(987,716.70001221,-1309.40002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (8)
    CreateObject(987,704.70001221,-1309.50000000,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (9)
    CreateObject(987,692.70001221,-1309.50000000,13.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (10)
    CreateObject(987,680.70001221,-1309.50000000,13.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (11)
    CreateObject(987,674.79998779,-1309.40002441,13.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (12)
    CreateObject(987,647.90002441,-1309.40002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (13)
    CreateObject(2794,665.09997559,-1311.90002441,18.60000038,0.00000000,0.00000000,0.00000000); //object(cj_air_d_3) (1)
    CreateObject(984,659.50000000,-1309.50000000,13.30000019,90.00000000,173.27929688,304.72076416); //object(fenceshit2) (1)
    CreateObject(987,648.20001221,-1297.09997559,14.50000000,0.00000000,4.00000000,268.00000000); //object(elecfence_bar) (14)
    CreateObject(987,648.40002441,-1285.40002441,15.89999962,0.00000000,8.00000000,268.00000000); //object(elecfence_bar) (15)
    CreateObject(987,648.59997559,-1279.09997559,16.39999962,0.00000000,8.00000000,268.00000000); //object(elecfence_bar) (16)
    CreateObject(987,647.40002441,-1267.50000000,16.70000076,0.00000000,0.00000000,274.00000000); //object(elecfence_bar) (17)
    CreateObject(987,646.20001221,-1255.09997559,17.50000000,0.00000000,0.00000000,276.00000000); //object(elecfence_bar) (18)
    CreateObject(987,644.79998779,-1244.00000000,17.20000076,0.00000000,0.00000000,276.00000000); //object(elecfence_bar) (19)
    CreateObject(987,643.50000000,-1232.80004883,18.00000000,0.00000000,2.00000000,276.00000000); //object(elecfence_bar) (20)
    CreateObject(987,654.50000000,-1236.30004883,16.00000000,0.00000000,354.00000000,162.00000000); //object(elecfence_bar) (21)
    CreateObject(987,666.20001221,-1219.59997559,15.10000038,0.00000000,0.00000000,22.00000000); //object(elecfence_bar) (22)
    CreateObject(987,663.59997559,-1216.90002441,15.50000000,0.00000000,350.00000000,8.00000000); //object(elecfence_bar) (23)
    CreateObject(987,693.20001221,-1199.59997559,17.10000038,358.00000000,0.00000000,318.00000000); //object(elecfence_bar) (24)
    CreateObject(987,702.00000000,-1207.00000000,19.50000000,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (25)
    CreateObject(987,708.20001221,-1196.69995117,20.60000038,0.00000000,356.00000000,60.00000000); //object(elecfence_bar) (26)
    CreateObject(987,713.90002441,-1187.00000000,21.20000076,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (27)
    CreateObject(987,720.20001221,-1176.80004883,22.10000038,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (28)
    CreateObject(987,725.90002441,-1166.40002441,22.89999962,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (29)
    CreateObject(987,731.70001221,-1155.69995117,23.50000000,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (30)
    CreateObject(987,737.50000000,-1144.50000000,24.20000076,0.00000000,0.00000000,14.00000000); //object(elecfence_bar) (31)
    CreateObject(987,748.79998779,-1142.09997559,24.89999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (32)
    CreateObject(987,760.40002441,-1142.09997559,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (33)
    CreateObject(987,772.29998779,-1142.40002441,25.79999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (34)
    CreateObject(987,787.50000000,-1173.50000000,22.20000076,0.00000000,356.00000000,94.00000000); //object(elecfence_bar) (35)
    CreateObject(987,787.50000000,-1185.30004883,20.70000076,0.00000000,352.00000000,90.00000000); //object(elecfence_bar) (36)
    CreateObject(987,787.29998779,-1196.80004883,19.29999924,0.00000000,354.00000000,88.00000000); //object(elecfence_bar) (37)
    CreateObject(987,787.29998779,-1208.09997559,17.39999962,0.00000000,352.00000000,92.00000000); //object(elecfence_bar) (38)
    CreateObject(987,787.50000000,-1219.50000000,15.39999962,0.00000000,350.00000000,92.00000000); //object(elecfence_bar) (39)
    CreateObject(987,787.50000000,-1231.59997559,14.19999981,0.00000000,354.00000000,90.00000000); //object(elecfence_bar) (40)
    CreateObject(987,787.29998779,-1242.90002441,13.89999962,0.00000000,358.00000000,90.00000000); //object(elecfence_bar) (41)
    CreateObject(987,786.79998779,-1254.80004883,13.50000000,0.00000000,0.00000000,88.00000000); //object(elecfence_bar) (42)
    CreateObject(987,787.29998779,-1266.80004883,13.39999962,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (43)
    CreateObject(987,787.50000000,-1278.69995117,13.30000019,0.00000000,0.00000000,92.00000000); //object(elecfence_bar) (44)
    CreateObject(987,787.29998779,-1288.30004883,13.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (45)
    CreateObject(980,786.50000000,-1152.40002441,25.39999962,0.00000000,0.00000000,94.00000000); //object(airportgate) (1)
    CreateObject(980,659.50000000,-1227.09997559,17.79999924,0.00000000,0.00000000,64.00000000); //object(airportgate) (3)
    CreateObject(980,664.90002441,-1309.59997559,15.19999981,0.00000000,0.00000000,0.00000000); //object(airportgate) (4)

    AddStaticVehicleEx(422,684.50000000,-1305.09997559,13.69999981,90.00000000,6,-1,15); //Bobcat
    AddStaticVehicleEx(402,684.29998779,-1300.90002441,13.50000000,92.00000000,-1,-1,15); //Buffalo
    AddStaticVehicleEx(411,658.29998779,-1301.40002441,13.39999962,0.00000000,-1,-1,15); //Infernus
    AddStaticVehicleEx(411,657.79998779,-1293.90002441,13.39999962,0.00000000,-1,-1,15); //Infernus
    AddStaticVehicleEx(451,658.20001221,-1285.19995117,13.39999962,0.00000000,-1,-1,15); //Turismo
    AddStaticVehicleEx(451,658.00000000,-1276.80004883,13.39999962,0.00000000,-1,-1,15); //Turismo
    AddStaticVehicleEx(506,683.50000000,-1296.90002441,13.39999962,86.00000000,-1,-1,15); //Super GT
    AddStaticVehicleEx(506,683.20001221,-1290.80004883,13.39999962,88.00000000,-1,-1,15); //Super GT
    AddStaticVehicleEx(555,683.59997559,-1286.90002441,13.39999962,88.00000000,6,-1,15); //Windsor
    AddStaticVehicleEx(559,684.40002441,-1282.80004883,13.30000019,90.00000000,-1,-1,15); //Jester
    AddStaticVehicleEx(533,684.29998779,-1270.09997559,13.39999962,90.00000000,-1,-1,15); //Feltzer
    AddStaticVehicleEx(531,683.79998779,-1266.30004883,13.60000038,94.00000000,-1,-1,15); //Tractor
    AddStaticVehicleEx(522,684.40002441,-1262.50000000,13.19999981,102.00000000,-1,-1,15); //NRG-500
    AddStaticVehicleEx(522,684.29998779,-1260.50000000,13.19999981,88.00000000,-1,-1,15); //NRG-500
    AddStaticVehicleEx(586,685.20001221,-1252.50000000,13.30000019,0.00000000,-1,-1,15); //Wayfarer
    AddStaticVehicleEx(523,680.50000000,-1257.30004883,13.19999981,90.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,659.29998779,-1264.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,659.70001221,-1268.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,656.70001221,-1269.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,657.00000000,-1264.09997559,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,656.50000000,-1260.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,659.59997559,-1260.50000000,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(596,658.20001221,-1254.09997559,13.39999962,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,659.50000000,-1247.00000000,13.80000019,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,677.79998779,-1245.09997559,14.69999981,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,680.90002441,-1242.50000000,15.10000038,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,684.79998779,-1239.50000000,15.50000000,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(599,677.79998779,-1226.09997559,16.20000076,112.00000000,-1,-1,15); //Police Ranger
    AddStaticVehicleEx(599,683.20001221,-1222.30004883,16.60000038,282.00000000,-1,-1,15); //Police Ranger
    AddStaticVehicleEx(599,688.70001221,-1219.19995117,17.00000000,264.00000000,-1,-1,15); //Police Ranger
    AddStaticVehicleEx(601,784.00000000,-1298.69995117,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,778.90002441,-1302.50000000,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,773.79998779,-1302.59997559,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,768.59997559,-1302.19995117,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,763.50000000,-1302.50000000,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,756.70001221,-1302.40002441,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,751.20001221,-1301.90002441,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,742.20001221,-1302.30004883,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,734.70001221,-1302.09997559,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(425,765.40002441,-1227.00000000,14.39999962,86.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(425,743.59997559,-1227.00000000,14.39999962,92.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(425,764.59997559,-1246.00000000,14.39999962,94.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(425,743.79998779,-1243.80004883,14.39999962,90.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(487,745.59997559,-1261.59997559,13.80000019,0.00000000,-1,-1,15); //Maverick
    AddStaticVehicleEx(487,766.79998779,-1262.19995117,13.80000019,0.00000000,-1,-1,15); //Maverick
    AddStaticVehicleEx(497,756.00000000,-1279.80004883,13.80000019,0.00000000,-1,-1,15); //Police Maverick
    AddStaticVehicleEx(520,780.29998779,-1262.90002441,14.50000000,0.00000000,-1,-1,15); //Hydra
    AddStaticVehicleEx(427,689.20001221,-1236.30004883,16.29999924,0.00000000,-1,-1,15); //Enforcer
    AddStaticVehicleEx(427,695.09997559,-1232.30004883,16.79999924,0.00000000,-1,-1,15); //Enforcer
    AddStaticVehicleEx(432,738.79998779,-1162.40002441,21.39999962,266.00000000,-1,1,15); //Rhino
    AddStaticVehicleEx(432,722.09997559,-1214.90002441,18.50000000,0.00000000,-1,-1,15); //Rhino
    AddStaticVehicleEx(432,709.00000000,-1205.90002441,18.29999924,294.00000000,-1,-1,15); //Rhino
    AddStaticVehicleEx(432,714.50000000,-1217.40002441,18.10000038,346.00000000,-1,-1,15); //Rhino
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ap1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,0.00000000,0.00000000,0.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,0.00000000,0.00000000,94.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,0.00000000,0.00000000,64.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,0.00000000,0.00000000,143.0009765625);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,0.00000000,0.00000000,95.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,0.00000000,0.00000000,0.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    return 0;
}
Reply
#2

Altera a public OnPlayerCommandText e troca por essa

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ap1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,4.0,0.0,0.0,0.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,4.0,0.0,0.0,94.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,4.0,0.0,0.0,64.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,4.0,0.0,0.0,143.0009765625);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,4.0,0.0,0.0,95.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,4.0,0.0,0.0,0.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    return 0;
}

Faltou apenas a velocidade do portao depois das cordenadas X,Y,Z procura ver uns video que tu aprende Veja uns video de como criar portгo vocк vai aprender muito a wiki todos dizem que tem tudo pena que eu acho muito confuso entгo fica a dica videos vocк pode aprender tambem mas nгo deixa de visitar a Wiki
Reply
#3

pawn Код:
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(142) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(142) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(149) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(149) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(156) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(156) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(163) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(163) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(170) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(170) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(177) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\filterscripts\HQ.pwn(177) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


12 Warnings.

Linha dos warn:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ap1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,4.0,0.0,0.0,0.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,4.0,0.0,0.0,94.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,4.0,0.0,0.0,64.00000000);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,4.0,0.0,0.0,143.0009765625);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,4.0,0.0,0.0,95.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,4.0,0.0,0.0,0.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    return 0;
}
Reply
#4

o codigo de ShutDown_ vai funcioar, o unico problema foi que vc so definiu as cordenadas, e nao definiu a velicodade
Reply
#5

Nгo definiu a velocidade.(Como disseram acima)
E nгo definiu a variavel.
Exemplo :
pawn Код:
p1 = CreateObject(BLABLABLALBA)
Por isso nгo estб movendo mesmo.

No comando ele irб mover o objeto "p1", sendo que ele nгo resulta em nada.
Reply
#6

pawn Код:
/*******************************************************************************
*                                 <=[News]=>                                   *
*******************************************************************************/

new p1;
new p2;
new p3;
Isso ai acima num ta definido?
Eos warn vai dar problem?
Reply
#7

Quote:
Originally Posted by Arthenry
Посмотреть сообщение
pawn Код:
/*******************************************************************************
*                                 <=[News]=>                                   *
*******************************************************************************/

new p1;
new p2;
new p3;
Isso ai acima num ta definido?
Eos warn vai dar problem?
--'
Essas variavel estгo sendo criadas,so para ser usada nos comandos.
Mais nгo indentifica oque p1 й.

Vocк tem q fazer como eu mostrei acima.

pawn Код:
p1 = CreateObject(......);
Ai sim irб mover.
Pos no comando ele move o objeto "p1", mais o p1 nгo estб definido como "objeto"( = ).
Reply
#8

Entгo tenho que por essa variavel que tu mandou 3 vez sу q com p1 p2 p3 que irб mover certo ?
Reply
#9

Que Fique um detalhe so to te ajudando porque tu tentou me ajudar no meu problema entгo uma mгo lava a outra
Deixe Seu code assim

pawn Код:
#include <a_samp>

/*******************************************************************************
*                         <=[Cores E Defines]=>                                *
*******************************************************************************/

#define COR_VerdeExercito 0x9ACD32AA
#define COR_Cinza 0xAFAFAFAA
#define COR_VerdeClaro 0x81F628AA
#define COR_Amarelo 0xFFFF00AA
#define COR_AzulClaro 0x33CCFFAA
#define COR_Azul 0x0050F6AA
#define COR_Verde 0x33AA33AA
#define COR_VermelhoEscuro 0xF60000AA
#define COR_Laranja 0xFF9900AA
#define COR_VermelhoClaro 0xF60000AA
#define COR_Branco 0xFFFFFFFF
#define COR_Preto 0x000000AA

/*******************************************************************************
*                                 <=[News]=>                                   *
*******************************************************************************/

new p1;
new p2;
new p3;

main()
{
    print("\n----------------------------------");
    print("  HQ [F.A]-Feito por Ivan_Mota      ");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
    p1 = CreateObject(980,786.50000000,-1152.40002441,25.39999962,0.0,0.0,94.0); //object(airportgate) (1)
    p2 = CreateObject(980,659.50000000,-1227.09997559,17.79999924,0.0,0.0,64.0); //object(airportgate) (2)
    p3 = CreateObject(980,664.90002441,-1309.59997559,15.19999981,0.0,0.0,0.0); //object(airportgate) (4)
   
    CreateObject(987,787.40002441,-1309.90002441,13.39999962,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (1)
    CreateObject(987,787.29998779,-1298.00000000,13.30000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (2)
    CreateObject(987,775.40002441,-1309.90002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
    CreateObject(987,764.59997559,-1309.69995117,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
    CreateObject(987,752.79998779,-1309.50000000,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5)
    CreateObject(987,740.79998779,-1309.40002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (6)
    CreateObject(987,728.70001221,-1309.50000000,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (7)
    CreateObject(987,716.70001221,-1309.40002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (8)
    CreateObject(987,704.70001221,-1309.50000000,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (9)
    CreateObject(987,692.70001221,-1309.50000000,13.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (10)
    CreateObject(987,680.70001221,-1309.50000000,13.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (11)
    CreateObject(987,674.79998779,-1309.40002441,13.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (12)
    CreateObject(987,647.90002441,-1309.40002441,13.30000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (13)
    CreateObject(2794,665.09997559,-1311.90002441,18.60000038,0.00000000,0.00000000,0.00000000); //object(cj_air_d_3) (1)
    CreateObject(984,659.50000000,-1309.50000000,13.30000019,90.00000000,173.27929688,304.72076416); //object(fenceshit2) (1)
    CreateObject(987,648.20001221,-1297.09997559,14.50000000,0.00000000,4.00000000,268.00000000); //object(elecfence_bar) (14)
    CreateObject(987,648.40002441,-1285.40002441,15.89999962,0.00000000,8.00000000,268.00000000); //object(elecfence_bar) (15)
    CreateObject(987,648.59997559,-1279.09997559,16.39999962,0.00000000,8.00000000,268.00000000); //object(elecfence_bar) (16)
    CreateObject(987,647.40002441,-1267.50000000,16.70000076,0.00000000,0.00000000,274.00000000); //object(elecfence_bar) (17)
    CreateObject(987,646.20001221,-1255.09997559,17.50000000,0.00000000,0.00000000,276.00000000); //object(elecfence_bar) (18)
    CreateObject(987,644.79998779,-1244.00000000,17.20000076,0.00000000,0.00000000,276.00000000); //object(elecfence_bar) (19)
    CreateObject(987,643.50000000,-1232.80004883,18.00000000,0.00000000,2.00000000,276.00000000); //object(elecfence_bar) (20)
    CreateObject(987,654.50000000,-1236.30004883,16.00000000,0.00000000,354.00000000,162.00000000); //object(elecfence_bar) (21)
    CreateObject(987,666.20001221,-1219.59997559,15.10000038,0.00000000,0.00000000,22.00000000); //object(elecfence_bar) (22)
    CreateObject(987,663.59997559,-1216.90002441,15.50000000,0.00000000,350.00000000,8.00000000); //object(elecfence_bar) (23)
    CreateObject(987,693.20001221,-1199.59997559,17.10000038,358.00000000,0.00000000,318.00000000); //object(elecfence_bar) (24)
    CreateObject(987,702.00000000,-1207.00000000,19.50000000,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (25)
    CreateObject(987,708.20001221,-1196.69995117,20.60000038,0.00000000,356.00000000,60.00000000); //object(elecfence_bar) (26)
    CreateObject(987,713.90002441,-1187.00000000,21.20000076,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (27)
    CreateObject(987,720.20001221,-1176.80004883,22.10000038,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (28)
    CreateObject(987,725.90002441,-1166.40002441,22.89999962,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (29)
    CreateObject(987,731.70001221,-1155.69995117,23.50000000,0.00000000,0.00000000,60.00000000); //object(elecfence_bar) (30)
    CreateObject(987,737.50000000,-1144.50000000,24.20000076,0.00000000,0.00000000,14.00000000); //object(elecfence_bar) (31)
    CreateObject(987,748.79998779,-1142.09997559,24.89999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (32)
    CreateObject(987,760.40002441,-1142.09997559,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (33)
    CreateObject(987,772.29998779,-1142.40002441,25.79999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (34)
    CreateObject(987,787.50000000,-1173.50000000,22.20000076,0.00000000,356.00000000,94.00000000); //object(elecfence_bar) (35)
    CreateObject(987,787.50000000,-1185.30004883,20.70000076,0.00000000,352.00000000,90.00000000); //object(elecfence_bar) (36)
    CreateObject(987,787.29998779,-1196.80004883,19.29999924,0.00000000,354.00000000,88.00000000); //object(elecfence_bar) (37)
    CreateObject(987,787.29998779,-1208.09997559,17.39999962,0.00000000,352.00000000,92.00000000); //object(elecfence_bar) (38)
    CreateObject(987,787.50000000,-1219.50000000,15.39999962,0.00000000,350.00000000,92.00000000); //object(elecfence_bar) (39)
    CreateObject(987,787.50000000,-1231.59997559,14.19999981,0.00000000,354.00000000,90.00000000); //object(elecfence_bar) (40)
    CreateObject(987,787.29998779,-1242.90002441,13.89999962,0.00000000,358.00000000,90.00000000); //object(elecfence_bar) (41)
    CreateObject(987,786.79998779,-1254.80004883,13.50000000,0.00000000,0.00000000,88.00000000); //object(elecfence_bar) (42)
    CreateObject(987,787.29998779,-1266.80004883,13.39999962,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (43)
    CreateObject(987,787.50000000,-1278.69995117,13.30000019,0.00000000,0.00000000,92.00000000); //object(elecfence_bar) (44)
    CreateObject(987,787.29998779,-1288.30004883,13.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (45)

    AddStaticVehicleEx(422,684.50000000,-1305.09997559,13.69999981,90.00000000,6,-1,15); //Bobcat
    AddStaticVehicleEx(402,684.29998779,-1300.90002441,13.50000000,92.00000000,-1,-1,15); //Buffalo
    AddStaticVehicleEx(411,658.29998779,-1301.40002441,13.39999962,0.00000000,-1,-1,15); //Infernus
    AddStaticVehicleEx(411,657.79998779,-1293.90002441,13.39999962,0.00000000,-1,-1,15); //Infernus
    AddStaticVehicleEx(451,658.20001221,-1285.19995117,13.39999962,0.00000000,-1,-1,15); //Turismo
    AddStaticVehicleEx(451,658.00000000,-1276.80004883,13.39999962,0.00000000,-1,-1,15); //Turismo
    AddStaticVehicleEx(506,683.50000000,-1296.90002441,13.39999962,86.00000000,-1,-1,15); //Super GT
    AddStaticVehicleEx(506,683.20001221,-1290.80004883,13.39999962,88.00000000,-1,-1,15); //Super GT
    AddStaticVehicleEx(555,683.59997559,-1286.90002441,13.39999962,88.00000000,6,-1,15); //Windsor
    AddStaticVehicleEx(559,684.40002441,-1282.80004883,13.30000019,90.00000000,-1,-1,15); //Jester
    AddStaticVehicleEx(533,684.29998779,-1270.09997559,13.39999962,90.00000000,-1,-1,15); //Feltzer
    AddStaticVehicleEx(531,683.79998779,-1266.30004883,13.60000038,94.00000000,-1,-1,15); //Tractor
    AddStaticVehicleEx(522,684.40002441,-1262.50000000,13.19999981,102.00000000,-1,-1,15); //NRG-500
    AddStaticVehicleEx(522,684.29998779,-1260.50000000,13.19999981,88.00000000,-1,-1,15); //NRG-500
    AddStaticVehicleEx(586,685.20001221,-1252.50000000,13.30000019,0.00000000,-1,-1,15); //Wayfarer
    AddStaticVehicleEx(523,680.50000000,-1257.30004883,13.19999981,90.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,659.29998779,-1264.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,659.70001221,-1268.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,656.70001221,-1269.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,657.00000000,-1264.09997559,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,656.50000000,-1260.30004883,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(523,659.59997559,-1260.50000000,13.30000019,0.00000000,-1,-1,15); //HPV1000
    AddStaticVehicleEx(596,658.20001221,-1254.09997559,13.39999962,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,659.50000000,-1247.00000000,13.80000019,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,677.79998779,-1245.09997559,14.69999981,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,680.90002441,-1242.50000000,15.10000038,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(596,684.79998779,-1239.50000000,15.50000000,0.00000000,-1,-1,15); //Police Car (LSPD)
    AddStaticVehicleEx(599,677.79998779,-1226.09997559,16.20000076,112.00000000,-1,-1,15); //Police Ranger
    AddStaticVehicleEx(599,683.20001221,-1222.30004883,16.60000038,282.00000000,-1,-1,15); //Police Ranger
    AddStaticVehicleEx(599,688.70001221,-1219.19995117,17.00000000,264.00000000,-1,-1,15); //Police Ranger
    AddStaticVehicleEx(601,784.00000000,-1298.69995117,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,778.90002441,-1302.50000000,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,773.79998779,-1302.59997559,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,768.59997559,-1302.19995117,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,763.50000000,-1302.50000000,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,756.70001221,-1302.40002441,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,751.20001221,-1301.90002441,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,742.20001221,-1302.30004883,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(601,734.70001221,-1302.09997559,13.50000000,0.00000000,-1,-1,15); //S.W.A.T. Van
    AddStaticVehicleEx(425,765.40002441,-1227.00000000,14.39999962,86.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(425,743.59997559,-1227.00000000,14.39999962,92.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(425,764.59997559,-1246.00000000,14.39999962,94.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(425,743.79998779,-1243.80004883,14.39999962,90.00000000,-1,-1,15); //Hunter
    AddStaticVehicleEx(487,745.59997559,-1261.59997559,13.80000019,0.00000000,-1,-1,15); //Maverick
    AddStaticVehicleEx(487,766.79998779,-1262.19995117,13.80000019,0.00000000,-1,-1,15); //Maverick
    AddStaticVehicleEx(497,756.00000000,-1279.80004883,13.80000019,0.00000000,-1,-1,15); //Police Maverick
    AddStaticVehicleEx(520,780.29998779,-1262.90002441,14.50000000,0.00000000,-1,-1,15); //Hydra
    AddStaticVehicleEx(427,689.20001221,-1236.30004883,16.29999924,0.00000000,-1,-1,15); //Enforcer
    AddStaticVehicleEx(427,695.09997559,-1232.30004883,16.79999924,0.00000000,-1,-1,15); //Enforcer
    AddStaticVehicleEx(432,738.79998779,-1162.40002441,21.39999962,266.00000000,-1,1,15); //Rhino
    AddStaticVehicleEx(432,722.09997559,-1214.90002441,18.50000000,0.00000000,-1,-1,15); //Rhino
    AddStaticVehicleEx(432,709.00000000,-1205.90002441,18.29999924,294.00000000,-1,-1,15); //Rhino
    AddStaticVehicleEx(432,714.50000000,-1217.40002441,18.10000038,346.00000000,-1,-1,15); //Rhino
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ap1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,4.0,0.0,0.0,0.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp1", cmdtext, true) == 0) {
    {
    MoveObject(p1, -1152.40002441,25.39999962,4.0,0.0,0.0,94.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,4.0,0.0,0.0,64.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp2", cmdtext, true) == 0) {
    {
    MoveObject(p2, -1227.09997559,17.79999924,4.0,0.0,0.0,143.0009765625);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    if(strcmp("/ap3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,4.0,0.0,0.0,95.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Abrindo O Portao !");
    }
    return 1;
    }
    if(strcmp("/fp3", cmdtext, true) == 0) {
    {
    MoveObject(p3, -1309.59997559,15.19999981,4.0,0.0,0.0,0.0);
    SendClientMessage(playerid, 0xF60000AA, "[NVC]Fechando O Portao !");
    }
    return 1;
    }
    return 0;
}
Reply
#10

Nгo abre de jeito nenhum
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)