19.12.2013, 03:02
(
Последний раз редактировалось L.S.T; 20.12.2013 в 16:09.
)
Galera Parei de Joga SA-MP a um tempo jб, ai vi esse sistema no meu pc e resolvi posta aqui:
Sistema de Jogar FUTEBOL + Estadio em "LV"
*nгo sei se esse sistema de futebol esta 100% perfeito pois nгo testei
antes de posta aqui mais quando fiz estava funcionando tudo perfeitamente,
vou posta aqui e qualquer coisa vcs reporta! abss
Imagens
Comandos
Ta ae o PAWNO!
New:*Sistema de Jogar FUTEBOL + Estadio em "LS"
New:*Sistema de Jogar FUTEBOL + Estadio em "SF"
Sistema de Jogar FUTEBOL + Estadio em "LV"
*nгo sei se esse sistema de futebol esta 100% perfeito pois nгo testei
antes de posta aqui mais quando fiz estava funcionando tudo perfeitamente,
vou posta aqui e qualquer coisa vcs reporta! abss
Imagens
Comandos
Quote:
/EstadioLV - Ver os Comandos! ----------- /AbrirELvM - Abrir a Entrada Mandante. /FeicharELvM - Feichar a Entrada Mandante. ----------- /AbrirELvV - Abrir a Entrada Visitante. /FeicharELvV - Feichar a Entrada Visitante. ----------- /JogarLV - Para Consegir Chutar a Bola do Estadio LV. /CampoELV - Ir Para o Campo (Vestiario)! /RbolaLV - volta a bola para o MeioCampo. |
PHP код:
// === [Includes] ===
#include <a_samp>
#include <dudb>
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward ObjectToPoint(Float:radi, objectgt, Float:x, Float:y, Float:z);
forward KeyChanges();
new playingfootball[MAX_PLAYERS];
new lastentered[128];
//==== [Entradas] ========
//Mandante
new EntradaM1;
new EntradaM2;
new EntradaM3;
new EntradaM4;
new EntradaM5;
new EntradaM6;
new EntradaM7;
new EntradaM8;
new EntradaM9;
new EntradaM10;
new EntradaM11;
new EntradaM12;
new EntradaM13;
new EntradaM14;
new EntradaM15;
new EntradaM16;
new EntradaM17;
new EntradaM18;
new EntradaM19;
new EntradaM20;
new SaidaM;
//Visitante
new EntradaV1;
new EntradaV2;
new EntradaV3;
new EntradaV4;
new EntradaV5;
new EntradaV6;
new EntradaV7;
new EntradaV8;
new EntradaV9;
new EntradaV10;
new SaidaV;
//Subida/Desida
new SubirJuizLV;
new DescerJuizLV;
//=====================
// === [Color Defines] ===
#define COLOR_BLUE 0x33AAFFFF
#define COR_VermelhoEscuro 0xF60000AA
#define COR_Azul 0x0050F6AA
#define COLOR_RED 0xAA3333AA
// === [Forward] ===
forward IsStringAName(string[]);
forward GetPlayerID(string[]);
forward Restart();
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
// === [Loops] ===
new futebol;
public OnFilterScriptInit()
{
print(" ***************************************************** ");
print(" *| Sistema de Futebol |* ");
print(" *| Feito Por Lucas Topazio |* ");
print(" ***************************************************** ");
}
public OnGameModeInit()
{
UsePlayerPedAnims();
//=Subirdescer
Create3DTextLabel("/SairELV", 0xDFB0FFFF, 1371, 2205, 799, 40.0, 0, 0);//Visitante
DescerJuizLV = CreatePickup(1318, 1, 1371, 2192, 798.5, 0);//Visitante
Create3DTextLabel("Campo", 0xDFB0FFFF, 1371, 2192, 798.5, 40.0, 0, 0);//Visitante
SubirJuizLV = CreatePickup(1318, 1, 1369, 2196, 9.5, 0);//Visitante
Create3DTextLabel("Vestiario", 0xDFB0FFFF, 1369, 2196, 9.5, 8.0, 0, 0);//Visitante
//======saidas========
SaidaV = CreatePickup(1318, 1, 1412.6596679688, 2107.595703125, 12.015625, 0);//Visitante
Create3DTextLabel("Saida", 0xDFB0FFFF, 1412.6596679688, 2107.595703125, 12.015625, 40,0);//Visitante
//--------------------
SaidaM = CreatePickup(1318, 1, 1317.421875, 2213.8024902344, 12.015625, 0);//Mandante
Create3DTextLabel("Saida", 0xDFB0FFFF, 1317.421875, 2213.8024902344, 12.015625, 40,0);//Mandante
//======3DLabel========
Create3DTextLabel("Entrada Mandante", 0xDFB0FFFF, 1336, 2223, 18, 40,0);//Mandante
Create3DTextLabel("Entrada Visitante", 0xDFB0FFFF, 1481, 2129, 14, 40,0);//Visitante
//======BOLA==========
futebol = CreateObject(1598, 1347.44,2149.91,10.3156, 0, 0, 0);
//======Objetos=======
CreateObject(18045,1365.0000000,2196.6000977,799.9532471,0.0000000,0.0000000,0.0000000); //Camarote
CreateObject(7418, 1347.8896484375, 2149.5498046875, 12.609999656677, 0, 0, 0, 300);
CreateObject(974, 1390.7620849609, 2154.1103515625, 12.801177978516, 0, 0, 0, 300);
CreateObject(974, 1394.0758056641, 2150.8039550781, 12.801177978516, 0, 0, 270, 300);
CreateObject(974, 1394.0758056641, 2148.515625, 12.801177978516, 0, 0, 269.99450683594, 300);
CreateObject(974, 1390.8210449219, 2145.3447265625, 12.801177978516, 0, 0, 179.99450683594, 300);
CreateObject(974, 1390.1999511719, 2150.7734375, 15.565999984741, 90, 0, 269.99450683594, 300);
CreateObject(974, 1391.19921875, 2150.76171875, 15.565999984741, 90, 0, 269.98901367188, 300);
CreateObject(974, 1391.4719238281, 2148.7407226563, 15.565999984741, 90, 180, 89.989288330078, 300);
CreateObject(974, 1390.1494140625, 2148.7734375, 15.565999984741, 90, 0, 269.98901367188, 300);
CreateObject(974, 1391.4487304688, 2150.7458496094, 15.565999984741, 90, 0, 269.98901367188, 300);
CreateObject(2960, 1387.3612060547, 2145.353515625, 12.10000038147, 0, 270, 0, 300);
CreateObject(2960, 1387.3603515625, 2145.353515625, 13.319999694824, 0, 270, 0, 300);
CreateObject(2960, 1387.2565917969, 2153.853515625, 13.319999694824, 0, 270, 0, 300);
CreateObject(2960, 1387.2565917969, 2153.853515625, 12.10000038147, 0, 270, 0, 300);
CreateObject(2960, 1387.25, 2151.8000488281, 15.60000038147, 90, 270, 0, 300);
CreateObject(2960, 1387.25, 2147.5422363281, 15.60000038147, 90, 270, 0, 300);
CreateObject(974, 1304.2515869141, 2145.6015625, 12.801177978516, 0, 0, 179.99450683594, 300);
CreateObject(974, 1303.7512207031, 2145.619140625, 12.801177978516, 0, 0, 179.99450683594, 300);
CreateObject(974, 1304.0584716797, 2154.2885742188, 12.801177978516, 0, 0, 179.99450683594, 300);
CreateObject(974, 1303.8087158203, 2154.3115234375, 12.801177978516, 0, 0, 179.99450683594, 300);
CreateObject(974, 1304.1439208984, 2151.6350097656, 15.569990158081, 90, 0, 179.99450683594, 300);
CreateObject(974, 1304.1385498047, 2148.3764648438, 15.569990158081, 90, 180, 359.99462890625, 300);
CreateObject(974, 1300.58984375, 2148.9548339844, 12.801177978516, 0, 0, 87.994506835938, 300);
CreateObject(974, 1300.6435546875, 2150.9541015625, 12.801177978516, 0, 0, 87.989501953125, 300);
CreateObject(974, 1303.8883056641, 2148.3930664063, 15.569990158081, 90, 179.99450683594, 359.99450683594, 300);
CreateObject(974, 1303.8448486328, 2151.4038085938, 15.569990158081, 90, 179.99450683594, 359.99450683594, 300);
CreateObject(2960, 1307.1484375, 2154.25, 13.319999694824, 0, 270, 0, 300);
CreateObject(2960, 1307.3000488281, 2145.6142578125, 13.319999694824, 0, 270, 0, 300);
CreateObject(2960, 1307.3000488281, 2145.6018066406, 12.10000038147, 0, 270, 0, 300);
CreateObject(2960, 1307.1484375, 2154.25, 12.10000038147, 0, 270, 0, 300);
CreateObject(2960, 1307.1484375, 2147.7990722656, 15.60000038147, 90, 270, 0, 300);
CreateObject(2960, 1307.1484375, 2152.048828125, 15.60000038147, 90, 270, 0, 300);
CreateObject(3881, 1299.4609375, 2219.4287109375, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1306.4647216797, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1313.4676513672, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1320.4705810547, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1327.4735107422, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1334.46875, 2219.4287109375, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1341.4653320313, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1348.4686279297, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(3881, 1353.4725341797, 2219.4289550781, 24.329742431641, 0, 0, 90, 300);
CreateObject(7418, 1347.8896484375, 2149.5498046875, 15.199999809265, 0, 0, 0, 300);
CreateObject(7418, 1347.8896484375, 2149.5498046875, 17.799999237061, 0, 0, 0, 300);
CreateObject(971, 1400.3767089844, 2099.7514648438, 14.800000190735, 0, 0, 0, 300);
CreateObject(971, 1409.1259765625, 2099.7514648438, 14.800000190735, 0, 0, 0, 300);
CreateObject(7418, 1347.8896484375, 2149.5498046875, 20.39999961853, 0, 0, 0, 300);
CreateObject(971, 1417.88671875, 2099.7509765625, 21.89999961853, 0, 0, 0, 300);
CreateObject(971, 1409.1259765625, 2099.7509765625, 21.89999961853, 0, 0, 0, 300);
CreateObject(971, 1400.3759765625, 2099.7509765625, 21.89999961853, 0, 0, 0, 300);
CreateObject(971, 1296.65625, 2203.533203125, 21.89999961853, 0, 0, 270, 300);
CreateObject(971, 1296.65625, 2212.2983398438, 14.800000190735, 0, 0, 269.99450683594, 300);
CreateObject(971, 1296.65625, 2203.533203125, 14.800000190735, 0, 0, 269.98901367188, 300);
CreateObject(971, 1296.65625, 2212.283203125, 21.89999961853, 0, 0, 269.98901367188, 300);
CreateObject(971, 1296.65625, 2217.533203125, 21.89999961853, 0, 0, 269.98901367188, 300);
CreateObject(971, 1300.8823242188, 2199.1198730469, 14.960000038147, 0, 0, 179.98901367188, 300);
CreateObject(971, 1309.3776855469, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1318.1226806641, 2199.1198730469, 14.960000038147, 0, 0, 179.98901367188, 300);
CreateObject(971, 1326.8677978516, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1335.3671875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1344.1171875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1352.8671875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1361.6171875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1370.3671875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1379.1171875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(971, 1387.8671875, 2199.1198730469, 14.960000038147, 0, 0, 179.98352050781, 300);
CreateObject(2933, 1393.8001708984, 2198.330078125, 14.10000038147, 0, 270, 331.99957275391, 300);
CreateObject(2933, 1396.2760009766, 2196.1630859375, 14.10000038147, 0, 270, 307.90002441406, 300);
CreateObject(2933, 1397.5660400391, 2193.158203125, 14.10000038147, 0, 270, 275.99133300781, 300);
CreateObject(971, 1397.75, 2187.0122070313, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2178.26171875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2169.51171875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2160.76171875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2152.01171875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2143.26171875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2134.5114746094, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2125.7607421875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2117.0107421875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2108.2607421875, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(971, 1397.75, 2104.1499023438, 14.960000038147, 0, 0, 89.983520507813, 300);
CreateObject(994, 1301.3907470703, 2228.3972167969, 10.0234375, 0, 0, 269.99996948242, 300);
CreateObject(994, 1303.6395263672, 2228.3283691406, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1305.3878173828, 2228.2751464844, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1307.1368408203, 2228.2214355469, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1309.1357421875, 2228.16015625, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1311.3846435547, 2228.0920410156, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1322.6517333984, 2228.73046875, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1324.6442871094, 2228.4497070313, 10.0234375, 0, 0, 269.98901367188, 300);
CreateObject(994, 1326.6434326172, 2228.4270019531, 10.0234375, 0, 0, 269.98901367188, 300);
CreateObject(994, 1330.3896484375, 2228.298828125, 10.0234375, 0, 0, 269.98901367188, 300);
CreateObject(994, 1332.388671875, 2228.251953125, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1340.8903808594, 2228.302734375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1343.1385498047, 2228.25, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1345.1369628906, 2228.203125, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1347.1351318359, 2228.15625, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1350.8833007813, 2228.068359375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1349.1336669922, 2228.109375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1360.8896484375, 2228.333984375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1362.6387939453, 2228.29296875, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1364.6376953125, 2228.24609375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1366.63671875, 2228.19921875, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1368.6357421875, 2228.15234375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1370.8846435547, 2228.099609375, 10.0234375, 0, 0, 269.99450683594, 300);
CreateObject(994, 1485.7775878906, 2104.3149414063, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.8984375, 2106.310546875, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1486.01953125, 2108.306640625, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1486.1254882813, 2110.0532226563, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1486.01171875, 2112.3134765625, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.8833007813, 2114.3247070313, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1486.138671875, 2143.1923828125, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.9951171875, 2144.9541015625, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.8515625, 2146.7158203125, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.7231445313, 2148.7270507813, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.5947265625, 2150.73828125, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(994, 1485.98046875, 2152.96875, 10.0234375, 0, 0, 175.98999023438, 300);
CreateObject(1528, 1321.0997314453, 2217.09375, 20.085922241211, 0, 0, 0, 300);
CreateObject(994, 1328.6422119141, 2228.3962402344, 10.0234375, 0, 0, 269.98901367188, 300);
return 1;
}
public KeyChanges()
{
new keys, updown, leftright;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
GetPlayerKeys(playerid, keys, updown, leftright);
new Float:ox, Float:oy, Float:oz;
GetObjectPos(futebol, ox, oy, oz);
new Float:px, Float:py, Float:pz;
new Float:angle;
GetPlayerFacingAngle(playerid, angle);
if(keys == KEY_HANDBRAKE && playingfootball[playerid] == 1)
{
if(PlayerToPoint(1.7,playerid,ox,oy,oz))
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(lastentered, sizeof(lastentered), "%s", pName);
GetPlayerPos(playerid, px, py, pz);
GetXYInFrontOfPlayer(playerid, px, py, 7.0);
MoveObject(futebol,px,py,10.3156,10.0);
PlayerPlaySound(playerid,1130,0.0,0.0,0.0);
ApplyAnimation(playerid,"FIGHT_D","FightD_1",4.1,0,1,1,0,0);
}
}
else if(keys == KEY_HANDBRAKE + KEY_SPRINT && playingfootball[playerid] == 1)
{
if(PlayerToPoint(1.7,playerid,ox,oy,oz))
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(lastentered, sizeof(lastentered), "%s", pName);
GetPlayerPos(playerid, px, py, pz);
GetXYInFrontOfPlayer(playerid, px, py, 7.0);
MoveObject(futebol,px,py,10.3156,10.0);
PlayerPlaySound(playerid,1130,0.0,0.0,0.0);
ApplyAnimation(playerid,"FIGHT_D","FightD_1",4.1,0,1,1,0,0);
}
}
}
}
}
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}
//==============================================================================
public OnPlayerPickUpPickup(playerid, pickupid)
{
//Subir/Deser
if(pickupid == SubirJuizLV)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid, 1364, 2200, 799);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Esta no Vestiario!");
}
}
if(pickupid == DescerJuizLV)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid, 1374, 2195, 10);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D}Vocк Esta no Campo! {88AA88}/JogarLV");
}
}
//-------------mandante---------------------------------------------------------
if(pickupid == EntradaM1)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM2)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM3)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM4)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM5)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM6)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM7)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM8)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM9)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM10)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM11)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM12)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM13)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM14)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM15)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM16)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM17)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM18)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM19)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaM20)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1315,2214,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == SaidaM)
{
SetPlayerPos(playerid,1328,2229,12);
}
//-------------visitante--------------------------------------------------------
if(pickupid == EntradaV1)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2108,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV2)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2108,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV3)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2108,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV4)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2108,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV5)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2108,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
}
if(pickupid == EntradaV6)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2138,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV7)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2138,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV8)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2138,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV9)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2138,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == EntradaV10)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COR_VermelhoEscuro, "Nгo Pode Entrar no Estadio de Carro/Moto");
}
else
{
SetPlayerPos(playerid,1410,2138,13);
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} Vocк Comprou um Ingresso Por {88AA88}R$50,00!");
}
}
if(pickupid == SaidaV)
{
SetPlayerPos(playerid,1486,2110,12);
}
return 1;
}
//==============================================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
//===========================ABRIR ESTADIO======================================
//Mandante
if(strcmp(cmd, "/AbrirELVM", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_VermelhoEscuro, "Sу Administradores logados na RCON podem usar este comando!");
EntradaM1 = CreatePickup(1318, 1, 1302.4786376953, 2223.3474121094, 11.0234375, 0);
EntradaM2 = CreatePickup(1318, 1, 1304.7252197266, 2223.2214355469, 11.0234375, 0);
EntradaM3 = CreatePickup(1318, 1, 1306.2224121094, 2223.1372070313, 11.0234375, 0);
EntradaM4 = CreatePickup(1318, 1, 1308.21875, 2223.025390625, 11.0234375, 0);
EntradaM5 = CreatePickup(1318, 1, 1310.2158203125, 2222.9140625, 11.0234375, 0);
EntradaM6 = CreatePickup(1318, 1, 1323.5550537109, 2223.1740722656, 11.0234375, 0);
EntradaM7 = CreatePickup(1318, 1, 1325.5393066406, 2223.3120117188, 11.0234375, 0);
EntradaM8 = CreatePickup(1318, 1, 1327.5234375, 2223.4501953125, 11.0234375, 0);
EntradaM9 = CreatePickup(1318, 1, 1329.5205078125, 2223.3388671875, 11.0234375, 0);
EntradaM10 = CreatePickup(1318, 1, 1331.517578125, 2223.2275390625, 11.0234375, 0);
EntradaM11 = CreatePickup(1318, 1, 1341.7664794922, 2222.9064941406, 11.0234375, 0);
EntradaM12 = CreatePickup(1318, 1, 1344.0125732422, 2222.7805175781, 11.0234375, 0);
EntradaM13 = CreatePickup(1318, 1, 1346.2723388672, 2222.9045410156, 11.0234375, 0);
EntradaM14 = CreatePickup(1318, 1, 1348.0189208984, 2222.8068847656, 11.0234375, 0);
EntradaM15 = CreatePickup(1318, 1, 1350.015625, 2222.6953125, 11.0234375, 0);
EntradaM16 = CreatePickup(1318, 1, 1361.8040771484, 2223.0393066406, 11.0234375, 0);
EntradaM17 = CreatePickup(1318, 1, 1363.5513916016, 2222.9411621094, 11.0234375, 0);
EntradaM18 = CreatePickup(1318, 1, 1365.5623779297, 2223.0793457031, 11.0234375, 0);
EntradaM19 = CreatePickup(1318, 1, 1367.5733642578, 2223.2175292969, 11.0234375, 0);
EntradaM20 = CreatePickup(1318, 1, 1369.5703125, 2223.10546875, 11.0234375, 0);
SendClientMessageToAll( 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} A Entrada Mandante do Estadio Foi {08FF08}Aberta.");
return 1;
}
if(strcmp(cmd, "/FecharELVM", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_VermelhoEscuro, "Sу Administradores logados na RCON podem usar este comando!");
DestroyPickup(EntradaM1);
DestroyPickup(EntradaM2);
DestroyPickup(EntradaM3);
DestroyPickup(EntradaM4);
DestroyPickup(EntradaM5);
DestroyPickup(EntradaM6);
DestroyPickup(EntradaM7);
DestroyPickup(EntradaM8);
DestroyPickup(EntradaM9);
DestroyPickup(EntradaM10);
DestroyPickup(EntradaM11);
DestroyPickup(EntradaM12);
DestroyPickup(EntradaM13);
DestroyPickup(EntradaM14);
DestroyPickup(EntradaM15);
DestroyPickup(EntradaM16);
DestroyPickup(EntradaM17);
DestroyPickup(EntradaM18);
DestroyPickup(EntradaM19);
DestroyPickup(EntradaM20);
SendClientMessageToAll( 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} A Entrada Mandante do Estadio Foi {F00000}Fechada.");
return 1;
}
//visitante---------------------------------------------------------------------
if(strcmp(cmd, "/AbrirELVv", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_VermelhoEscuro, "Sу Administradores logados na RCON podem usar este comando!");
EntradaV1 = CreatePickup(1318, 1, 1480.8304443359, 2105.7978515625, 11.0234375, 0);
EntradaV2 = CreatePickup(1318, 1, 1480.7351074219, 2107.8112792969, 11.0234375, 0);
EntradaV3 = CreatePickup(1318, 1, 1480.6208496094, 2109.5754394531, 11.0234375, 0);
EntradaV4 = CreatePickup(1318, 1, 1480.7749023438, 2111.5688476563, 11.0234375, 0);
EntradaV5 = CreatePickup(1318, 1, 1480.9484863281, 2113.8122558594, 11.0234375, 0);
EntradaV6 = CreatePickup(1318, 1, 1481.0759277344, 2144.4709472656, 11.0234375, 0);
EntradaV7 = CreatePickup(1318, 1, 1480.9384765625, 2146.2333984375, 11.0234375, 0);
EntradaV8 = CreatePickup(1318, 1, 1481.0673828125, 2148.2294921875, 11.0234375, 0);
EntradaV9 = CreatePickup(1318, 1, 1481.1962890625, 2150.2255859375, 11.0234375, 0);
EntradaV10 = CreatePickup(1318, 1, 1481.0756835938, 2152.2377929688, 11.0234375, 0);
SendClientMessageToAll( 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} A Entrada Visitante do Estadio Foi {08FF08}Aberta");
return 1;
}
if(strcmp(cmd, "/FecharELVv", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_VermelhoEscuro, "Sу Administradores logados na RCON podem usar este comando!");
DestroyPickup(EntradaV1);
DestroyPickup(EntradaV2);
DestroyPickup(EntradaV3);
DestroyPickup(EntradaV4);
DestroyPickup(EntradaV5);
DestroyPickup(EntradaV6);
DestroyPickup(EntradaV7);
DestroyPickup(EntradaV8);
DestroyPickup(EntradaV9);
DestroyPickup(EntradaV10);
SendClientMessageToAll( 0x33CCFFAA, "{88AA88}[Infor]:{D0C07D} A Entrada Visitante do Estadio Foi {F00000}Fechada.");
return 1;
}
//==================================================
if(strcmp(cmd, "/rbolaLV", true) == 0)
{
DestroyObject(futebol);
futebol = CreateObject(1598, 1347.44,2149.91,10.3156, 0, 0, 0);
new pname[MAX_PLAYER_NAME];
new string [256];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{88AA88}[Infor]:{D0C07D} %s Fez a Bola de Futebol Voltou ao Meio Campo", pname);
SendClientMessageToAll(0xF0FFB8AA, string);
return 1;
}
if(!strcmp(cmdtext, "/jogarLV", true))
{
SetTimerEx("KeyChanges", 100, 1, "i", playerid);
playingfootball[playerid]=1;
return 1;
}
if(!strcmp(cmdtext, "/SairELV", true))
{
SetPlayerPos(playerid, 1417, 2084, 12);
return 1;
}
if(!strcmp(cmdtext, "/EstadioLV", true))
{
SendClientMessage(playerid, -1, "{AFAFAF}======================{D0C07D}|| {88AA88}Comandos do Estadio LV {D0C07D}||{AFAFAF}======================");
SendClientMessage(playerid, -1,"{88AA88}/AbrirELvM {D0C07D}- Abrir a Entrada M, {88AA88}/FeicharELvM {D0C07D}- Feichar a Entrada M");
SendClientMessage(playerid, -1,"{88AA88}/AbrirELvV {D0C07D}- Abrir a Entrada V, {88AA88}/FeicharELvV {D0C07D}- Feichar a Entrada V ");
SendClientMessage(playerid, -1,"{88AA88}/JogarLV {D0C07D}- Para Consegir Chutar a Bola, {88AA88}/CampoELV {D0C07D}- Ir Para o Campo{88AA88}(Vestiario)!");
SendClientMessage(playerid, -1,"{88AA88}[FS/Mapa] {D0C07D}- Feito Por Lucas Topazio [L.s.T]!");
return 1;
}
if(!strcmp(cmdtext, "/CampoELV", true))
{
SetPlayerPos(playerid, 1364, 2200, 799);
SetTimerEx("KeyChanges", 100, 1, "i", playerid);
playingfootball[playerid]=1;
return 1;
}
return 0;
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
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) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
New:*Sistema de Jogar FUTEBOL + Estadio em "SF"