- 0
/minigun !?
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Deejaybwg
Salut !
Am luat o comanda /minigun din GM-ul unui server:
[pawn] if(!strcmp(cmdtext, "/minigun", true))
{
ResetPlayerWeapons(playerid);
DM[playerid] = 1;
InMinigun[playerid] = 1;
SetPlayerRandomSpawnMinigun(playerid);
GivePlayerWeapon(playerid,38 , 9999);
GameTextForPlayer(playerid,"~r~~h~Welcome to Minigun",3000,5);
GetPlayerName(playerid, pname, sizeof (pname));
format(string3, sizeof(string3),"%s Has Gone to Minigun ~r~(/minigun)~p~", pname);
TextDrawDestroy(Text:Reclama);
Reclama = TextDrawCreate(250.000000, 435.000000, " ");
TextDrawFont(Reclama, 1);
TextDrawLetterSize(Reclama, 0.300000, 1.000000);
TextDrawColor(Reclama, 0x00C2ECFF);
TextDrawSetOutline(Reclama, 1);
TextDrawSetProportional(Reclama, 1);
TextDrawSetShadow(Reclama, 1);
TextDrawShowForAll(Reclama);
TextDrawSetString(Reclama, string3);
SetTimer("reclamatime",10000,false);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerWorldBounds(playerid, 1439.348, 1271.44, 2235.263, 2080.541);
SendClientMessage(playerid, 0x6AF7E1FF, " If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!");
SendClientMessage(playerid,COLOR_GREEN, "If you want to get out of DM use the command /kill!");
return 1;
}[/pawn]
Si am luat si comanda cu care sa poti iesi din acea zona:
[pawn] if (strcmp("/exitm", cmdtext, true, 10) == 0)
{
if(InMinigun[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
SetPlayerPos(playerid,403.447265,2466.154296,16.506214);
ResetPlayerWeapons(playerid);
SetPlayerWorldBounds(playerid, 20000.0000,-20000.0000,20000.0000,-20000.0000); // Bounderies Off//
DM[playerid] = 0;
InMinigun[playerid] = 0;
}
if(InMinigun[playerid] == 0)
{
SendClientMessage(playerid,COLOR_ULTRARED,"You are not in Minigun zone. Type /minigun");
}
return 1;
}[/pawn]
Am pus sus in script:
[pawn]new InMinigun[MAX_PLAYERS];[/pawn]
Apoi, am pus si unde am eu new Float:
[pawn]new Float:gRandomPlayerSpawnsMinigun[10][0] = {
{1410.5425,2176.3142,12.0156},
{1409.6898,2206.1653,19.8438},
{1370.7050,2196.3381,9.7578},
{1321.1451,2196.9858,11.0234},
{1329.6407,2210.1064,12.0156},
{1298.7916,2156.4512,11.0234},
{1325.2078,2101.3110,11.0156},
{1416.5570,2102.6685,23.4782},
{1390.2469,2218.6946,23.4464},
{1418.9036,2125.6411,29.6907}
};[/pawn]
Am pus si unde am forwards:
[pawn]forward SetPlayerRandomSpawnMinigun(playerid);[/pawn]
Apoi, dedesubt la public OnGameModeExit() am pus asa:
[pawn]public SetPlayerRandomSpawnMinigun(playerid)
{
if (iSpawnSet[playerid] == 0)
{
new rand = random(sizeof(gRandomPlayerSpawnsMinigun));
SetPlayerPos(playerid, gRandomPlayerSpawnsMinigun[rand][0], gRandomPlayerSpawnsMinigun[rand][1], gRandomPlayerSpawnsMinigun[rand][2]); // Warp the player
}
return 1;
}[/pawn]
Am dat compile si imi da asa:
D:\[RSG]\gamemodes\RSG4564212RO.pwn(2539) : error 017: undefined symbol "iSpawnSet"
D:\[RSG]\gamemodes\RSG4564212RO.pwn(2539) : warning 215: expression has no effect
D:\[RSG]\gamemodes\RSG4564212RO.pwn(2539) : error 001: expected token: ";", but found "]"
D:\[RSG]\gamemodes\RSG4564212RO.pwn(2539) : error 029: invalid expression, assumed zero
D:\[RSG]\gamemodes\RSG4564212RO.pwn(2539) : fatal error 107: too many error messages on one line
Am pus sus in script asa:
[pawn]new iSpawnSet[MAX_PLAYERS];[/pawn]
Am dat compile, totul bine. Dar cand intru pe server si dau /minigun, ma teleporteaza acolo, imi da minigun, dar daca dau de exemplu: /sf, ma teleporteaza acolo (asta se intampla pe serverul meu). Si dupa ce ma teleportez la /minigun, daca dau de exemplu /goto, ar trebui sa-mi trimita un SendClientMessage, dar nu mi-l trimite:
[pawn] SendClientMessage(playerid,COLOR_RED, "Type /exitm for leave.");[/pawn]
Asta se intampla pe serverul meu, dupa ce am pus tot ce apartine de minigun de pe celalalt server.
Pe celalat server ( serverul de pe care am luat /minigun si tot ce tine de comanda ) cand ma duc la /minigun, daca dau de exemplu /goto, imi trimite SendClientMessage-ul:
[pawn] SendClientMessage(playerid,COLOR_RED, "Type /exitm for leave.");[/pawn]
dar pe serverul meu nu mi-l trimite. Am cautat in GM-ul serverului de pe care am luat /minigun, si am gasit SendClientMessage-ul care trebuia sa apara cand incercam o comanda:
[pawn] }
else
format(string, sizeof(string),"Type /exitm for leave the DeathMatch.",cmdtext);
SendClientMessage(playerid, 0xE60000FF, string);
return 1;
}[/pawn]
Am incercat sa pun:
[pawn] }
else
format(string, sizeof(string),"Type /exitm for leave the DeathMatch.",cmdtext);
SendClientMessage(playerid, 0xE60000FF, string);
return 1;
}[/pawn]
la sfarsitul comenzii /minigun, dar nu e bine asa, pentru ca imi da "Pawno Stopped Working".
Unde trebuie sa adaug SendClientMessage-ul de mai sus ? M-am uitat si in tutorialul lui stuntman, dar am facut tot ce trebuia. Am copiat tot ce continea "minigun" din GM-ul serverului acela, in GM-ul serverului meu, dar merge sa ma teleportez.
Nu reusesc deloc sa rezolv. De cateva zile incerc, dar nu reusesc.
www.youtube.com/thebwgg
10 answers to this question
Recommended Posts