[AJUDA]Comando abrir portao
#1

Alquem pode me ajudar eu tava tentando fazer um portao para abrir.mais e 2 portao mais eu nao consigo
Pf me ajudem

sou novo no panw Deis de ja obrigado




Код HTML:

#include <a_samp>

#if defined FILTERSCRIPT
new portao = 0, portaoz;
new portao2= 2, portaozz;
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

//edit cassa
CreateObject(3502, 1249.388428, -730.477478, 92.170258, 0.0000, 0.0000, 22.5000);
CreateObject(976, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1321.073242, -816.034363, 71.719040, 0.0000, 0.0000, 270.0000);
CreateObject(976, 1321.094360, -824.628906, 72.697807, 0.0000, 0.0000, 270.0000);
CreateObject(976, 1249.876587, -767.324585, 91.247070, 0.0000, 0.0000, 0.0000);
CreateObject(987, 1281.393311, -841.984192, 74.470345, 0.0000, 0.0000, 0.0000);
CreateObject(987, 1269.449341, -841.986938, 74.543274, 0.0000, 0.0000, 0.0000);
CreateObject(987, 1258.083618, -844.195374, 73.307709, 0.0000, 0.0000, 11.2500);
CreateObject(987, 1246.561157, -846.469116, 72.836838, 0.0000, 0.0000, 11.2500);
CreateObject(987, 1234.961548, -847.827148, 72.273499, 0.0000, 0.0000, 6.9528);
CreateObject(987, 1223.282837, -849.283813, 72.326218, 0.0000, 0.0000, 6.9528);
CreateObject(987, 1211.899902, -850.671875, 74.311050, 0.0000, 0.0000, 6.9528);
CreateObject(987, 1202.645630, -843.254089, 74.444283, 0.0000, 0.0000, 321.9528);
CreateObject(987, 1199.622925, -841.073303, 78.422272, 0.0000, 0.0000, 321.9528);
CreateObject(987, 1198.329468, -829.405884, 78.259323, 0.0000, 0.0000, 276.9528);
CreateObject(987, 1199.167480, -817.754150, 78.479889, 0.0000, 0.0000, 265.7028);
CreateObject(987, 1199.751709, -806.245728, 79.844101, 0.0000, 0.0000, 265.7028);
CreateObject(987, 1204.979736, -795.702026, 80.355789, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1206.531738, -792.833313, 83.751404, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1210.234497, -785.275391, 86.145874, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1214.964600, -775.903809, 87.293411, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1218.951294, -768.025085, 89.717949, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1230.788086, -766.694153, 90.585732, 0.0000, 0.0000, 186.9528);
CreateObject(987, 1239.848389, -766.810181, 89.309624, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1239.832153, -766.831543, 93.911392, 0.0000, 0.0000, 180.0000);
CreateObject(3749, 1245.755371, -767.332153, 97.009697, 0.0000, 0.0000, 0.0000);
CreateObject(984, 1245.777954, -767.320618, 95.271416, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1267.392822, -767.416016, 91.063705, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1293.032593, -841.669556, 74.229248, 0.0000, 0.0000, 33.7500);
CreateObject(987, 1302.385620, -835.257813, 73.957123, 0.0000, 0.0000, 33.7500);
CreateObject(987, 1310.075073, -830.130066, 73.997475, 0.0000, 0.0000, 22.5000);
CreateObject(3749, 1320.497925, -821.272705, 77.990555, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.340576, -810.664673, 77.054626, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.251953, -799.893433, 78.485519, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.399780, -793.894226, 83.275848, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.445190, -782.075867, 86.160568, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.373535, -779.419800, 90.600830, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.376465, -767.454102, 90.999146, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1308.292969, -767.515808, 90.987160, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1296.329834, -767.560486, 90.971008, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1284.452881, -767.397339, 91.380325, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1272.689819, -767.522644, 91.006126, 0.0000, 0.0000, 180.0000);

#endif

public OnGameModeInit()
{
portao = CreateObject(976, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000);
portao2 = CreateObject(976, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000);
	// Don't use these lines if it's a filterscript

	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
 if (strcmp("/casap", cmdtext, true, 3)== 0)
{
if(portaoz == 0)
{
MoveObject(portao, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000, 5);
SendClientMessage(playerid, 0xAA3333AA, "Portao aberto" );
portaoz = 1);
}
else if(portaoz == 1)
{
MoveObject(portao,1249.876587, -767.324585, 91.247070, 0.0000, 0.0000, 0.0000, 5);
SendClientMessage(playerid, 0xAA3333AA, "Portao fechado" );
portaoz = 0;
}
return 1;
}
 if (strcmp("/casapp", cmdtext, true, 3)== 0)
{
if(portaozz == 0)
{
MoveObject(portao2, 1321.073242, -816.034363, 71.719040, 0.0000, 0.0000, 270.0000, 5);
SendClientMessage(playerid, 0xAA3333AA, "Portao aberto" );
portaoz = 1;
}
else if(portaozz == 2)
{
MoveObject(portao2,1321.094360, -824.628906, 72.697807, 0.0000, 0.0000, 270.0000, 5);
SendClientMessage(playerid, 0xAA3333AA, "Portao fechado" );
portaoz = 0;
}
return 1;
}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
ERROS
Код HTML:
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 021: symbol already defined: "CreateObject"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 017: undefined symbol "portao"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 017: undefined symbol "portao2"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : warning: 217: loose indentation
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 017: undefined symbol "portaoz"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 017: undefined symbol "portao"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 017: undefined symbol "portaoz"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : warning: 215: expression has no effect
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 001: expected token: ";", but found ")"
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error: 029: invalid expression, assumed zero
C:\Documents and Settings\weverton\Desktop\casa.pwn(80) : error fatal: 107: too many error messages on one line
Reply


Messages In This Thread
[AJUDA]Comando abrir portao - by wevertonneves - 27.09.2011, 13:54
Respuesta: [AJUDA]Comando abrir portao - by ReDKiiL - 27.09.2011, 14:06
Re: [AJUDA]Comando abrir portao - by wevertonneves - 27.09.2011, 14:37
Re: [AJUDA]Comando abrir portao - by RebeloX - 27.09.2011, 15:30
Respuesta: Re: [AJUDA]Comando abrir portao - by ReDKiiL - 27.09.2011, 16:50
Re: [AJUDA]Comando abrir portao - by RebeloX - 27.09.2011, 17:17

Forum Jump:


Users browsing this thread: 3 Guest(s)