09.01.2011, 20:26
Quote:
It's apparently your gamemode causing the crash, look inside of ongamemodeinit and check to see if you're loading or saving any files, if you are,make sure the folder for their directory exists
|
Код:
public OnGameModeInit() { for(new i = 0; i < 299; i++) { if(IsValidSkin(i)) { AddPlayerClass(i,0.0,0.0,0.0,0.0,0,0,0,0,0,0); } } for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPVarInt(i,"Warned",0);//to debug } } MaxP = GetMaxPlayers(); drawagain(); SetTimer("pOnline", SEC2, 1); SetTimer("antiping", 10, true); FadeInit(); ShowPlayerMarkers(0); UsePlayerPedAnims(); GameTimer = SetTimer("GameTime",1000,1); PrizeMenu = CreateMenu("Redeemable prizes", 2, 50.0, 180.0, 200.0, 200.0); AddMenuItem(PrizeMenu, 0, "Minus 1 warning"); AddMenuItem(PrizeMenu, 1, "1,000 points"); AddMenuItem(PrizeMenu, 0, "Spawn armor"); AddMenuItem(PrizeMenu, 1, "15,000 points"); AddMenuItem(PrizeMenu, 0, "One match armor"); AddMenuItem(PrizeMenu, 1, "5,000 points"); AddMenuItem(PrizeMenu, 0, "Ammo - 500"); AddMenuItem(PrizeMenu, 1, "50 points"); AddMenuItem(PrizeMenu, 0, "Skip a level"); AddMenuItem(PrizeMenu, 1, "600 points"); Textdraw2 = TextDrawCreate(590.000000,412.000000,"~r~Top Score~n~~w~0"); TextDrawUseBox(Textdraw2,1); TextDrawBoxColor(Textdraw2,0x00000066); TextDrawTextSize(Textdraw2,0.000000,80.000000); TextDrawAlignment(Textdraw2,2); TextDrawBackgroundColor(Textdraw2,0x000000ff); TextDrawFont(Textdraw2,1); TextDrawLetterSize(Textdraw2,0.399999,1.500000); TextDrawColor(Textdraw2,0xffffffff); TextDrawSetOutline(Textdraw2,1); TextDrawSetProportional(Textdraw2,1); TextDrawSetShadow(Textdraw2,1); Textdraw0 = TextDrawCreate(86.000000,427.000000,"15:00"); TextDrawAlignment(Textdraw0,2); TextDrawBackgroundColor(Textdraw0,0x000000ff); TextDrawFont(Textdraw0,3); TextDrawLetterSize(Textdraw0,0.499999,2.000000); TextDrawColor(Textdraw0,0xffffffff); TextDrawSetOutline(Textdraw0,1); TextDrawSetProportional(Textdraw0,1); TextDrawSetShadow(Textdraw0,1); Newbie = TextDrawCreate(500, 100, "Rank: Newbie"); TextDrawAlignment(Newbie, 1); TextDrawFont(Newbie, 2); TextDrawLetterSize(Newbie, 0.400, 1.000); TextDrawColor(Newbie, COLOR_WHITE); TextDrawSetOutline(Newbie, 1); BabyKilla = TextDrawCreate(486, 100, "Rank: Baby Killa'"); TextDrawAlignment(BabyKilla, 1); TextDrawFont(BabyKilla, 2); TextDrawLetterSize(BabyKilla, 0.400, 1.000); TextDrawColor(BabyKilla, COLOR_YELLOW); TextDrawSetOutline(BabyKilla, 1); Soldier = TextDrawCreate(500, 100, "Rank: Soldier"); TextDrawAlignment(Soldier, 1); TextDrawFont(Soldier, 2); TextDrawLetterSize(Soldier, 0.400, 1.000); TextDrawColor(Soldier, COLOR_GREEN); TextDrawSetOutline(Soldier, 1); Gangsta = TextDrawCreate(500, 100, "Rank: Gangsta'"); TextDrawAlignment(Gangsta, 1); TextDrawFont(Gangsta, 2); TextDrawLetterSize(Gangsta, 0.400, 1.000); TextDrawColor(Gangsta, COLOR_ROYAL); TextDrawSetOutline(Gangsta, 1); Underboss = TextDrawCreate(483, 100, "Rank: Underboss"); TextDrawAlignment(Underboss, 1); TextDrawFont(Underboss, 2); TextDrawLetterSize(Underboss, 0.400, 1.000); TextDrawColor(Underboss, COLOR_PURPLE); TextDrawSetOutline(Underboss, 1); Boss = TextDrawCreate(490, 100, "Rank: Tha' Boss"); TextDrawAlignment(Boss, 1); TextDrawFont(Boss, 2); TextDrawLetterSize(Boss, 0.400, 1.000); TextDrawColor(Boss, COLOR_TUT); TextDrawSetOutline(Boss, 1); new var0[128]; format(var0, 128, " "); TextDraw1 = TextDrawCreate(1.0, 433.0, var0); TextDrawSetOutline(TextDraw1, 1); TextDrawFont(TextDraw1, 1); TextDrawUseBox(TextDraw1, true); TextDrawBoxColor(TextDraw1, 0x00A4F222); SetTimer("TextDraw", 60, true); SetTimer("StatsInfromation",300 , 1); for(new playerid = 0; playerid < MAX_PLAYERS; playerid++) { PlayerStats[playerid] = TextDrawCreate(231.000000,405.000000,""); Textdraw1 = TextDrawCreate(260.000000,391.000000,"STATS"); TextDrawUseBox(PlayerStats[playerid],1); TextDrawBoxColor(PlayerStats[playerid],0xffffff33); TextDrawTextSize(PlayerStats[playerid],389.000000,119.000000); TextDrawAlignment(PlayerStats[playerid],0); TextDrawAlignment(Textdraw1,0); TextDrawBackgroundColor(PlayerStats[playerid],0x000000ff); TextDrawBackgroundColor(Textdraw1,0xff000033); TextDrawFont(PlayerStats[playerid],2); TextDrawLetterSize(PlayerStats[playerid],0.399999,1.200000); TextDrawFont(Textdraw1,2); TextDrawLetterSize(Textdraw1,0.799999,1.300000); TextDrawColor(PlayerStats[playerid],0xffffffff); TextDrawColor(Textdraw1,0xffffffff); TextDrawSetOutline(PlayerStats[playerid],1); TextDrawSetOutline(Textdraw1,1); TextDrawSetProportional(PlayerStats[playerid],1); TextDrawSetProportional(Textdraw1,1); TextDrawSetShadow(PlayerStats[playerid],1); TextDrawSetShadow(Textdraw1,1); Save(playerid); } for(new i = 0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { tima[i] = SetTimerEx("Faus",750,1,"d",i); ____[i] = TextDrawCreate(300,300,"-"); TextDrawAlignment(____[i],0); TextDrawBackgroundColor(____[i],0x000000ff); TextDrawFont(____[i],2); TextDrawLetterSize(____[i],0.3,1.100000); TextDrawColor(____[i],0xffffffff); TextDrawSetOutline(____[i],1); TextDrawSetProportional(____[i],1); TextDrawSetShadow(____[i],1); } } CreateObject(2929,215.853454,1875.336547,13.951337,0.000000,0.000000,179.613388); CreateObject(2929,211.808059,1875.290649,13.951243,0.000000,0.000000,181.624099); CreateObject(988,96.789436,1920.165771,17.338628,0.000000,0.000000,271.234802); CreateObject(987,2776.981689,901.178710,9.765661,0.000000,0.000000,89.843864); CreateObject(987,2777.026855,913.340148,9.765661,0.000000,0.000000,90.343864); CreateObject(1225,2840.541748,956.958374,10.138525,0.000000,0.000000,168.783798); CreateObject(1225,2814.960693,891.875427,10.132592,0.000000,0.000000,186.957321); CreateObject(1225,2801.379150,890.245666,10.264112,0.000000,0.000000,194.814102); CreateObject(1225,2816.755126,933.871337,10.374737,0.000000,0.000000,256.854705); CreateObject(1225,2796.448242,989.189514,10.225549,0.000000,0.000000,257.794677); CreateObject(1225,2868.435546,944.667663,10.156861,0.000000,0.000000,318.582000); CreateObject(1225,2847.875000,1007.451965,10.111249,0.000000,0.000000,304.336944); SetGameModeText(".:COD: Gun Game:."); return 1; }