24.01.2012, 19:56
(
Последний раз редактировалось Djair_Black; 02.05.2012 в 22:39.
)
Bom galera, sou novo aqui mas resolvi postar um include para "GameMode". Й um evento de Le Parkour com comando que sу funciona com "Rcon".
- Eu testei totalmente, e nгo tem bugs;
- Crйditos sгo todos meus: Djair_Black;
- Obrigado a todos do forum, aprendi com vocкs muitas coisas que mim ajudaram a fazer este tutorial.
Primeiro coloque os "news":
Em Segundo lugar coloque no "public OnGameModeInit()":
Em terceiro no "public OnPlayerSelectedMenuRow(playerid, row)":
Em quarto no "public OnPlayerExitedMenu(playerid)":
Em quinto e ultimo no "public OnPlayerCommandText(playerid,cmdtext[])":
- Eu testei totalmente, e nгo tem bugs;
- Crйditos sгo todos meus: Djair_Black;
- Obrigado a todos do forum, aprendi com vocкs muitas coisas que mim ajudaram a fazer este tutorial.
Primeiro coloque os "news":
pawn Код:
new Menu:Portaevento;
new Porta;
pawn Код:
//Portгo
Porta = CreateObject(980, 1153.5999755859, 2581.6999511719, 12.60000038147, 0, 0, 60);
//Objetos
CreateObject(8253, 1164.6999511719, 2574.6999511719, 13.699999809265, 0, 0, 150);
CreateObject(2931, 1139.3000488281, 2584.3999023438, 9.8000001907349, 0, 0, 65);
CreateObject(11547, 1032.3000488281, 2604.8000488281, 12.800000190735, 0, 0, 0);
CreateObject(987, 1024.5, 2592.3999023438, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1024.8000488281, 2592.6000976563, 9.8000001907349, 0, 0, 90);
CreateObject(987, 1025, 2603.8999023438, 9.8000001907349, 0, 0, 90);
CreateObject(987, 1036.0999755859, 2592.1000976563, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1025.1999511719, 2615.6000976563, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1048.0999755859, 2591.6999511719, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1059.3000488281, 2591.3999023438, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1071, 2591.5, 9.8000001907349, 0, 0, 300);
CreateObject(987, 1076.9000244141, 2581.6999511719, 9.8000001907349, 0, 0, 299.99816894531);
CreateObject(987, 1082.5, 2571.8000488281, 9.8000001907349, 0, 0, 299.99816894531);
CreateObject(987, 1088.0999755859, 2561.8999023438, 9.8000001907349, 0, 0, 299.99816894531);
CreateObject(987, 1094.1999511719, 2552.1000976563, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1105.8000488281, 2552.3999023438, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1117.4000244141, 2552.6999511719, 9.8000001907349, 0, 0, 2);
CreateObject(987, 1129.3000488281, 2553.3999023438, 9.8000001907349, 0, 0, 3.99951171875);
CreateObject(987, 1140.6999511719, 2553.6000976563, 9.8000001907349, 0, 0, 50);
CreateObject(987, 1144.5, 2558.6000976563, 9.8000001907349, 0, 0, 49.998779296875);
CreateObject(987, 1162.1999511719, 2590.6999511719, 9.8000001907349, 0, 0, 49.998779296875);
CreateObject(987, 1158.3000488281, 2599.5, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1146.5999755859, 2599.6000976563, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1134.5, 2599.8000488281, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1128.6999511719, 2610.1000976563, 9.8000001907349, 0, 0, 300);
CreateObject(987, 1122.9000244141, 2620.6000976563, 9.8000001907349, 0, 0, 299.99816894531);
CreateObject(987, 1117.3000488281, 2630.3000488281, 9.8000001907349, 0, 0, 299.99816894531);
CreateObject(987, 1105.6999511719, 2630.5, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1094, 2630.6000976563, 9.8000001907349, 0, 0, 0);
CreateObject(987, 1082.5999755859, 2630.1999511719, 9.8000001907349, 0, 0, 4);
CreateObject(987, 1071.1999511719, 2629.8000488281, 9.8000001907349, 0, 0, 3.9990234375);
CreateObject(987, 1071.1999511719, 2629.8000488281, 9.8000001907349, 0, 0, 200);
CreateObject(987, 1060.5999755859, 2625.6000976563, 9.8000001907349, 0, 0, 199.9951171875);
CreateObject(987, 1049.6999511719, 2621.8000488281, 9.8000001907349, 0, 0, 199.9951171875);
CreateObject(987, 1044.1999511719, 2619.8000488281, 9.8000001907349, 0, 0, 199.9951171875);
CreateObject(989, 1163.5999755859, 2589.8000488281, 11.60000038147, 0, 0, 80);
CreateObject(989, 1167.5, 2558.6999511719, 11.60000038147, 0, 0, 80);
CreateObject(987, 1156.3000488281, 2586.8000488281, 9.8000001907349, 0, 0, 30);
CreateObject(987, 1150.5999755859, 2576.5, 9.8000001907349, 0, 0, 290);
CreateObject(2931, 1133.5, 2570.3000488281, 9.8000001907349, 0, 0, 64.9951171875);
CreateObject(2931, 1128.8000488281, 2555.1000976563, 9.8000001907349, 0, 0, 64.9951171875);
CreateObject(1660, 1140.0999755859, 2599.1000976563, 9.8000001907349, 0, 0, 170);
CreateObject(1660, 1136.0999755859, 2585, 9.8000001907349, 0, 0, 169.99694824219);
CreateObject(1660, 1133.0999755859, 2569.3999023438, 9.8000001907349, 0, 0, 169.99694824219);
CreateObject(3664, 1114.5, 2588, 17.89999961853, 0, 0, 80);
CreateObject(3625, 1118.0999755859, 2587.3000488281, 12.699999809265, 0, 0, 170);
CreateObject(13638, 1118.0999755859, 2565.1000976563, 12.60000038147, 0, 0, 0);
CreateObject(13640, 1109.5999755859, 2566.1000976563, 10.800000190735, 0, 0, 0);
CreateObject(13640, 1109.5999755859, 2563.3000488281, 12, 0, 0, 0);
CreateObject(13640, 1109.5999755859, 2555.5, 10.800000190735, 0, 0, 0);
CreateObject(13640, 1109.6999511719, 2575.8000488281, 10.800000190735, 0, 0, 0);
CreateObject(13640, 1109.6999511719, 2580.8000488281, 10.800000190735, 0, 0, 0);
CreateObject(13640, 1109.599609375, 2563.2998046875, 10.800000190735, 0, 0, 0);
CreateObject(13640, 1109.5999755859, 2566.8000488281, 12, 0, 0, 0);
CreateObject(13640, 1109.6999511719, 2555.3000488281, 12, 0, 0, 0);
CreateObject(13640, 1109.5999755859, 2575.8000488281, 12, 0, 0, 0);
CreateObject(13640, 1109.5999755859, 2580.8000488281, 12, 0, 0, 0);
CreateObject(13640, 1110, 2559.6000976563, 12, 0, 0, 0);
CreateObject(13640, 1109.3000488281, 2571.3000488281, 12, 0, 0, 0);
CreateObject(13640, 1110.3000488281, 2566.1000976563, 13, 0, 0, 0);
CreateObject(13640, 1110.4000244141, 2563.6000976563, 13, 0, 0, 0);
CreateObject(13640, 1110.9000244141, 2555.6000976563, 13, 0, 0, 0);
CreateObject(13640, 1109.8000488281, 2575.1000976563, 13, 0, 0, 0);
CreateObject(13640, 1109.5, 2579.8000488281, 13, 0, 0, 0);
CreateObject(13640, 1110, 2571.3000488281, 13, 0, 0, 0);
CreateObject(13640, 1110.6999511719, 2559.8000488281, 13, 0, 0, 0);
CreateObject(13640, 1109.5, 2580.5, 13, 0, 0, 2);
CreateObject(18609, 1123.9000244141, 2596.1000976563, 11, 0, 0, 0);
CreateObject(18609, 1124.5, 2601, 11, 0, 0, 0);
CreateObject(18609, 1125, 2605, 11, 0, 0, 0);
CreateObject(18609, 1125.4000244141, 2608.8000488281, 11, 0, 0, 0);
CreateObject(18609, 1124.6999511719, 2595.8999023438, 11, 0, 0, 0);
CreateObject(18609, 1125.3000488281, 2600.3999023438, 11, 0, 0, 0);
CreateObject(18609, 1125.6999511719, 2604.1999511719, 11, 0, 0, 0);
CreateObject(18609, 1126.0999755859, 2607.6000976563, 11, 0, 0, 0);
CreateObject(3364, 1119.1999511719, 2602.6999511719, 9.8000001907349, 0, 0, 0);
CreateObject(3625, 1114.9000244141, 2610.8000488281, 12.699999809265, 0, 0, 0);
CreateObject(3363, 1120.8000488281, 2615.3999023438, 9.8000001907349, 0, 0, 0);
CreateObject(6052, 1089.0999755859, 2592, 12.60000038147, 0, 0, 170);
CreateObject(6052, 1090.6999511719, 2596.8000488281, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1091.8000488281, 2601.6000976563, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1092.0999755859, 2607.3999023438, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1092.9000244141, 2612.3999023438, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1094.1999511719, 2617.6999511719, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1095.0999755859, 2619.3000488281, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1088.1999511719, 2588.3999023438, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1087.1999511719, 2584.3000488281, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1085.9000244141, 2579, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1084.6999511719, 2573.8999023438, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(6052, 1085, 2570.6999511719, 12.60000038147, 0, 0, 169.99694824219);
CreateObject(13590, 1083.0999755859, 2605.8000488281, 12.199999809265, 0, 0, 90);
CreateObject(13590, 1087.5, 2619.1999511719, 12.199999809265, 0, 0, 88);
CreateObject(16302, 1080.3000488281, 2615.3999023438, 14, 0, 0, 0);
CreateObject(16302, 1077.6999511719, 2600.6000976563, 14, 0, 0, 0);
Portaevento = CreateMenu("Portгo evento", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(Portaevento, 0, "Abrir Portгo");
AddMenuItem(Portaevento, 0, "Fechar Portгo");
AddMenuItem(Portaevento, 0, "Ir no local");
print("----------------------------------------------");
print(" Evento Le Parkour created by Djair_Black");
print("----------------------------------------------");
return 1;
}
pawn Код:
new Menu:leparkour;
leparkour = GetPlayerMenu(playerid);
if(leparkour == Portaevento)
{
switch(row)
{
case 0:
{
MoveObject(Porta,1153.5999755859,2581.6999511719,7.1, 3.0);
SendClientMessage(playerid,0x607840AA, "[INFO]: Portгo Aberto!");
GameTextForPlayer(playerid,"~r~A~y~brindo..", 1000, 1);
}
case 1:
{
MoveObject(Porta,1153.5999755859,2581.6999511719,12.60000038147, 2.0);
SendClientMessage(playerid,0x607840AA, "[INFO]: Portгo Fechado");
GameTextForPlayer(playerid,"~r~F~y~echando..", 1000, 1);
}
case 2:
{
SetPlayerPos(playerid,1167.5,2577.6999511719,13.6999);
SendClientMessage(playerid,0x607840AA, "[INFO]: Bem Vindo ao Evento!");
GameTextForPlayer(playerid,"~r~O ~r~E~y~vento!", 1000, 1);
}
}
OnPlayerExitedMenu(playerid);
}
pawn Код:
TogglePlayerControllable(playerid, 1);
pawn Код:
if(!strcmp(cmdtext,"/plp",true) && IsPlayerAdmin(playerid))
{
ShowMenuForPlayer(Portaevento,playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}