Оформил так, всё компелируеться, но не работает... [pwn]#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
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");
}
#endif
#define TEAM_CYAN 1
#define TEAM_BLUE 2
#define TEAM_GREEN 3
#define TEAM_ORANGE 4
#define TEAM_BALLAS 5
#define TEAM_GROVE 6
#define TEAM_VAGOS 7
#define TEAM_AZTECAS 8
#define TEAM_NANG 9
#define TEAM_RIFA 10
#define TEAM_MAFIA 11
#define TEAM_RMAFIA 12
#define TEAM_TRIADS 13
#define TEAM_BIKERS 14
#define TEAM_SMITH 15
#define TEAM_FBI 16
#define OBJECTIVE_COLOR 0x64000064
#define TEAM_GREEN_COLOR 0xFFFFFFAA
#define TEAM_BLUE_COLOR 0x0259EAFF
#define COLOR_ADD 0x63FF60AA
#define TEAM_CYAN_COLOR 0xAA3333AA
#define TEAM_ORANGE_COLOR 0xFF8300C8
#define TEAM_ORANGE1_COLOR 0xFF830099
#define TEAM_ORANGE2_COLOR 0xFF830088
#define TEAM_ORANGE3_COLOR 0xFF830077
#define TEAM_ORANGE4_COLOR 0xFF830066
#define TEAM_ORANGE5_COLOR 0xFF830055
#define TEAM_ORANGE6_COLOR 0xFF830044
#define TEAM_ORANGE7_COLOR 0xFF830033
#define TEAM_ORANGE8_COLOR 0xFF830022
#define TEAM_ORANGE9_COLOR 0xFF830011
#define TEAM_ORANGE10_COLOR 0xFF830000
#define TEAM_SMITH_COLOR 0xFF1493FF
#define TEAM_BALLAS_COLOR 0xD900D3C8
#define TEAM_BALLAS1_COLOR 0xD900D399
#define TEAM_BALLAS2_COLOR 0xD900D388
#define TEAM_BALLAS3_COLOR 0xD900D377
#define TEAM_BALLAS4_COLOR 0xD900D366
#define TEAM_BALLAS5_COLOR 0xD900D355
#define TEAM_BALLAS6_COLOR 0xD900D344
#define TEAM_BALLAS7_COLOR 0xD900D333
#define TEAM_BALLAS8_COLOR 0xD900D322
#define TEAM_BALLAS9_COLOR 0xD900D311
#define TEAM_BALLAS10_COLOR 0xD900D300
#define TEAM_GROVE_COLOR 0x00D900C8
#define TEAM_GROVE1_COLOR 0x00D90099
#define TEAM_GROVE2_COLOR 0x00D90088
#define TEAM_GROVE3_COLOR 0x00D90077
#define TEAM_GROVE4_COLOR 0x00D90066
#define TEAM_GROVE5_COLOR 0x00D90055
#define TEAM_GROVE6_COLOR 0x00D90044
#define TEAM_GROVE7_COLOR 0x00D90033
#define TEAM_GROVE8_COLOR 0x00D90022
#define TEAM_GROVE9_COLOR 0x00D90011
#define TEAM_GROVE10_COLOR 0x00D90000
#define TEAM_VAGOS_COLOR 0xFFC801C8
#define TEAM_VAGOS1_COLOR 0xFFC80199
#define TEAM_VAGOS2_COLOR 0xFFC80188
#define TEAM_VAGOS3_COLOR 0xFFC80177
#define TEAM_VAGOS4_COLOR 0xFFC80166
#define TEAM_VAGOS5_COLOR 0xFFC80155
#define TEAM_VAGOS6_COLOR 0xFFC80144
#define TEAM_VAGOS7_COLOR 0xFFC80133
#define TEAM_VAGOS8_COLOR 0xFFC80122
#define TEAM_VAGOS9_COLOR 0xFFC80111
#define TEAM_VAGOS10_COLOR 0xFFC80100
#define TEAM_AZTECAS_COLOR 0x01FCFFC8
#define TEAM_AZTECAS1_COLOR 0x01FCFF99
#define TEAM_AZTECAS2_COLOR 0x01FCFF88
#define TEAM_AZTECAS3_COLOR 0x01FCFF77
#define TEAM_AZTECAS4_COLOR 0x01FCFF66
#define TEAM_AZTECAS5_COLOR 0x01FCFF55
#define TEAM_AZTECAS6_COLOR 0x01FCFF44
#define TEAM_AZTECAS7_COLOR 0x01FCFF33
#define TEAM_AZTECAS8_COLOR 0x01FCFF22
#define TEAM_AZTECAS9_COLOR 0x01FCFF11
#define TEAM_AZTECAS10_COLOR 0x01FCFF00
#define TEAM_NANG_COLOR 0xBDCB92C8
#define TEAM_NANG1_COLOR 0xBDCB9299
#define TEAM_NANG2_COLOR 0xBDCB9288
#define TEAM_NANG3_COLOR 0xBDCB9277
#define TEAM_NANG4_COLOR 0xBDCB9266
#define TEAM_NANG5_COLOR 0xBDCB9255
#define TEAM_NANG6_COLOR 0xBDCB9244
#define TEAM_NANG7_COLOR 0xBDCB9233
#define TEAM_NANG8_COLOR 0xBDCB9222
#define TEAM_NANG9_COLOR 0xBDCB9211
#define TEAM_NANG10_COLOR 0xBDCB9200
#define TEAM_RIFA_COLOR 0x00A2A4C8
#define TEAM_RIFA1_COLOR 0x00A2A499
#define TEAM_RIFA2_COLOR 0x00A2A488
#define TEAM_RIFA3_COLOR 0x00A2A477
#define TEAM_RIFA4_COLOR 0x00A2A466
#define TEAM_RIFA5_COLOR 0x00A2A455
#define TEAM_RIFA6_COLOR 0x00A2A444
#define TEAM_RIFA7_COLOR 0x00A2A433
#define TEAM_RIFA8_COLOR 0x00A2A422
#define TEAM_RIFA9_COLOR 0x00A2A411
#define TEAM_RIFA10_COLOR 0x00A2A400
#define TEAM_MAFIA_COLOR 0x9A9999C8
#define TEAM_MAFIA1_COLOR 0x9A999999
#define TEAM_MAFIA2_COLOR 0x9A999988
#define TEAM_MAFIA3_COLOR 0x9A999977
#define TEAM_MAFIA4_COLOR 0x9A999966
#define TEAM_MAFIA5_COLOR 0x9A999955
#define TEAM_MAFIA6_COLOR 0x9A999944
#define TEAM_MAFIA7_COLOR 0x9A999933
#define TEAM_MAFIA8_COLOR 0x9A999922
#define TEAM_MAFIA9_COLOR 0x9A999911
#define TEAM_MAFIA10_COLOR 0x9A999900
#define TEAM_RMAFIA_COLOR 0x916600C8
#define TEAM_RMAFIA1_COLOR 0x91660099
#define TEAM_RMAFIA2_COLOR 0x91660088
#define TEAM_RMAFIA3_COLOR 0x91660077
#define TEAM_RMAFIA4_COLOR 0x91660066
#define TEAM_RMAFIA5_COLOR 0x91660055
#define TEAM_RMAFIA6_COLOR 0x91660044
#define TEAM_RMAFIA7_COLOR 0x91660033
#define TEAM_RMAFIA8_COLOR 0x91660022
#define TEAM_RMAFIA9_COLOR 0x91660011
#define TEAM_RMAFIA10_COLOR 0x91660000
#define TEAM_TRIADS_COLOR 0x587B95C8
#define TEAM_TRIADS1_COLOR 0x587B9599
#define TEAM_TRIADS2_COLOR 0x587B9588
#define TEAM_TRIADS3_COLOR 0x587B9577
#define TEAM_TRIADS4_COLOR 0x587B9566
#define TEAM_TRIADS5_COLOR 0x587B9555
#define TEAM_TRIADS6_COLOR 0x587B9544
#define TEAM_TRIADS7_COLOR 0x587B9533
#define TEAM_TRIADS8_COLOR 0x587B9522
#define TEAM_TRIADS9_COLOR 0x587B9511
#define TEAM_TRIADS10_COLOR 0x587B9500
#define TEAM_BIKERS_COLOR 0xA49A00C8
#define TEAM_BIKERS1_COLOR 0xA49A0099
#define TEAM_BIKERS2_COLOR 0xA49A0088
#define TEAM_BIKERS3_COLOR 0xA49A0077
#define TEAM_BIKERS4_COLOR 0xA49A0066
#define TEAM_BIKERS5_COLOR 0xA49A0055
#define TEAM_BIKERS6_COLOR 0xA49A0044
#define TEAM_BIKERS7_COLOR 0xA49A0033
#define TEAM_BIKERS8_COLOR 0xA49A0022
#define TEAM_BIKERS9_COLOR 0xA49A0011
#define TEAM_BIKERS10_COLOR 0xA49A0000
#define TEAM_FBI_COLOR 0x2641FEAA
#define COLOR_INVIS 0xAFAFAF00
#define COLOR_SPEC 0xBFC0C200
#define INACTIVE_PLAYER_ID 255
#define COLOR_NOTICE 0xFFAA43FF
#define ROB_MAX_DISTANCE 6.0 //Make sure it is a float. Keep it small to avoid complications while getting the nearest player.
#define ROB_MAX_DISTANCE2 50.0
#define ROB_MIN_WAIT 20000 //Time that players have to wait between /rob attempts in miliseconds.
#define ROB_SUCCESS_PERCENTAGE 60 //Chances of a player to succeed in a /rob attempt.
#define ROB_SUCCESS_PERCENTAGE2 100
#define ROB_AMOUNT_MIN_PERCENTAGE 20 //Min % of a victims money the robber can get if they succeed.
#define ROB_AMOUNT_MIN_PERCENTAGE2 90
#define ROB_AMOUNT_MAX_PERCENTAGE 50 //Max % of a victims money the robber can get if they succeed.
#define ROB_AMOUNT_MAX_PERCENTAGE2 90
#define COLOR_ROB_SUCCESS 0x00CCFFAA
#define COLOR_ROB_FAILURE 0xCCCCFFAA
#define COLOR_ROB_ERROR 0xFF0000AA
#define LATENCY 50
enum pInfo//=========[Player Info]========//[DIAMOND1]
{
pPassword[128], //1
pCash, //2
pAccount, //3
pAdmin, //4
pRank, //5
pJRank, //6
pJob, //7
pLevel, //8
pExp, //9
gPupgrade,//10
pKills,//11
pCB,//12
pHW,//13
pSR,
pSP,
pBD,
pDB,
pFUG,
pGun1,
pGun2,
pGun3,
pGun4,
pGun5,
pGun6,
pAmmo1,
pAmmo2,
pAmmo3,
pAmmo4,
pAmmo 5,
pAmmo6,
Float:pSHealth,
Float:pHealth,
Float:pPos_x,
Float:pPos_y,
Float:pPos_z,
pInt,
pLocal,
pTeam,
pModel,
pCell ,
pPnumber,
pPhousekey,
pPbiskey,
pDuty,
pLicA,
pLicB,
pLicJD,
pLicPL,
pLicFE,
pXpir,
pFood,
pWarnL,
pTick,
pWantL,
pFish,
p Prob,
pWeed,
pCoke,
pAEdit,
pJail,
pDisez,
pJPnts,
pSuspend,
pBanTime,
pDebitc,
pMisc,
pAju,
Float:pSArmour,
vehicle,
pKillz,
p CBz,
pHWz,
pSRz,
pWAz,
pPENz,
pDeathz,
pDMz,
pDrowned,
pFell,
pBusted,
pCrimkill,
pGangkill,
pCopkill,
p DMKill,
pDMDeath,
pDildoK,
pFlowerK,
pCaneK,
pGrenadeK,
pGasK,
pMolotovK,
pColtK,
pSPK,
pDeagleK,
pPShotK,
pSawnK,
p Spas12K,
pUziK,
pMP5K,
pAK47K,
pM4K,
pTec9K,
pRifleK,
pSRifleK,
pRPGK,
pHSRLK,
pFlameK,
pMiniK,
pSatchelK,
pFireEK ,
pSprayK,
pFistK,
pBrassK,
pGolfK,
pNightSK,
pBatK,
pShovelK,
pPoolCK,
pKatanaK,
pChainsawK,
pIntimK,
pKnifeK,
pD ildoD,
pFlowerD,
pCaneD,
pGrenadeD,
pGasD,
pMolotovD,
pColtD,
pSPD,
pDeagleD,
pPShotD,
pSawnD,
pSpas12D,
pUziD,
pM P5D,
pAK47D,
pM4D,
pTec9D,
pRifleD,
pSRifleD,
pRPGD,
pHSRLD,
pFlameD,
pMiniD,
pSatchelD,
pFireED,
pSprayD,
pFistD,
pBrassD,
p GolfD,
pNightSD,
pBatD,
pShovelD,
pPoolCD,
pKatanaD,
pChainsawD,
pIntimD,
pKnifeD,
pLogs,
pTmpMission,
p TmpRank,
pTmpDMkill,
pGangRank,
pWantedlevel, //
pLicense, //
pMuted,
pPbiskey2, //
pPhousekey2, //
pCDL,
pMotoL,
pDisconnects,
pMHeals,
pHealed,
pFucked,
pGotfucked,
pBlown,
pGotblown,
pWank,
pGotwanked,
pAnal,
p Gotanal,
pRobs,
pGotrobbed,
pSaves,
aMutes,
pMutes,
aSlaps,
pSlaps,
aKicks,
pKicks,
aScrews,
pScrews,
pGun7,
pAmmo7,
pGun8,
p Ammo8,
pLottoXP
};
enum hInfo//=========[House Info]===========
{
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hHealthx,
hHe althy,
hHealthz,
hArmourx,
hArmoury,
hArmourz,
hOwner[MAX_PLAYER_NAME],
hDiscription[MAX_PLAYER_NAME],
hValue,
hHel,
hArm,
hInt,
hLock,
hOwned,
hRooms,
hRent,
hRentabil,
hTakings,
hVec,
hVcol1,
hVcol2,
hDate,
hS tartLevel,
hLevel,
hRC
//hPlate[8]
};
new HouseInfo[102][hInfo];
new Float:gCopPlayerSpawns[2][3] = {
{-1605.80,717.35,11.67},
{-1603.80,717.35,11.67}
//{614.8,-608.2,17.2},
//{611.5,-607.8,17.2}
};
new Float:gMedPlayerSpawns[2][3] = {
{-2643.4,634.1,14.4},
{-2695.5,629.1,14.4}
};
new Float:gRandomPlayerSpawns[10][3] = {
{-1736.59,820.87,24.89}, //sp1
{-2719.55,803.54,53.58},
{-2620.45,341.04,6.33},
{-2725.79,-305.50,9.03},
{-2134.96,-429.45,35.33},
{-2134.99,209.84,37.31},
{-202 2.43,476.99,37.17},
{-1874.86,1132.28,47.44},
{-1969.78,1320.66,9.26},
{-2616.40,1400.42,9.09}
};
new Float:gRandomDMSpawns[21][3] = {
{-2414.0,1551.8,2.1}, // 1
{-2406.9,1555.2,2.1}, // 2
{-2392.8,1550.4,2.1}, // 3
{-2406.6,1545.1,2.1}, // 4
{-2391.9,1539.2,2.1}, // 5
{-2379.7,1541.8,2.1}, // 6
{-2366.9,1539.6,2.1}, // 7
{-2426.6,1537.4,2.1}, // 8
{-2473.5,1550.1,33.2}, // 9
{-2474.2,1546.8,23.6}, // 10
{-2464.2,1530.9,17.3}, // 11
{-2437.5,1559.0,17.3}, // 12
{-2416.3,1554.3,26.0}, // 13
{-2424.7,1542.5,26.0}, // 14
{-2410.5,1532.4,26.0}, // 15
{-2403.5,1546.5,26.0}, // 16
{-2389.2,1550.7,26.0}, // 17
{-2368.0,1556.7,17.3}, // 18
{-2351.5,1551.1,23.1}, // 19
{-2313.7,1546.4,18.7}, // 20
{-2313.7,1546.4,18.7} // 21
};
new DmScore[MAX_PLAYERS];
new DmHiScore;
new gFightLeader;
new gdebug = 0;
new PlayerInfo[MAX_PLAYERS][pInfo];
new gPlayerSpawned[MAX_PLAYERS];
static gTeam[MAX_PLAYERS];
new gPlayerFighter[MAX_PLAYERS];
forward SetPlayerRandomSpawn(playerid);
forward SetPlayerToTeamColor(playerid);
public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_GREEN)
{
SetPlayerColor(playerid,TEAM_GREEN_COLOR); // red
}
else if(gTeam[playerid] == TEAM_BLUE)
{
SetPlayerColor(playerid,TEAM_BLUE_COLOR); // blue
}
else if(gTeam[playerid] == TEAM_ORANGE)
{
SetPlayerColor(playerid,TEAM_ORANGE10_COLOR); // blue
}
else if(gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerColor(playerid,TEAM_BALLAS10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid,TEAM_GROVE10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid,TEAM_VAGOS10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_AZTECAS)
{
SetPlayerColor(playerid,TEAM_AZTECAS10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_NANG)
{
SetPlayerColor(playerid,TEAM_NANG10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_RIFA)
{
SetPlayerColor(playerid,TEAM_RIFA10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_MAFIA)
{
SetPlayerColor(playerid,TEAM_MAFIA10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_RMAFIA)
{
SetPlayerColor(playerid,TEAM_RMAFIA10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_TRIADS)
{
SetPlayerColor(playerid,TEAM_TRIADS10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_BIKERS)
{
SetPlayerColor(playerid,TEAM_BIKERS10_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_SMITH)
{
SetPlayerColor(playerid,TEAM_SMITH_COLOR); // purple
}
else if(gTeam[playerid] == TEAM_CYAN)
{
SetPlayerColor(playerid,TEAM_CYAN_COLOR); // blue
}
}
public SetPlayerRandomSpawn(playerid)
{
new rand;
new playername[32];
new house = PlayerInfo[playerid][pPhousekey];
GetPlayerName(playerid, playername, sizeof(playername));
if(gPlayerFighter[playerid] == 1)
{
new string[256];
gTeam[playerid] = 4;
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gRandomDMSpawns)-2)+1;
SetPlayerPos(playerid, gRandomDMSpawns[rand][0], gRandomDMSpawns[rand][1], gRandomDMSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
format(string, sizeof(string), " ~r~%d~w~|~g~%d",DmScore[playerid],DmHiScore);
GameTextForPlayer(playerid, string, 5000, 6);
if(gFightLeader < 1000)
{
TogglePlayerControllable(playerid, 0);
}
if (gdebug >=0){printf("DEBUG SPAWNED: Playerid:%d Team:%d DMPoint:%d", playerid, gTeam[playerid], rand);}
return 1;
}
if(house !=255)
{
/*
if(gTeam[playerid] <= 2 && strcmp(playername, HouseInfo[house][hOwner], true) == 0 || gTeam[playerid] > 2)
{
*/
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
return 1;
//}
}
if ((gTeam[playerid]) == 2)
{
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
return 1;
}
if ((gTeam[playerid]) == 1)
{
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gMedPlayerSpawns));
SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
return 1;
}
else
{
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0); //willie
PlayerInfo[playerid][pInt] = 0;
if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
return 1;
}
//return 1; UNREACHABLE
}
public OnPlayerSpawn(playerid)
{
if (gPlayerSpawned[playerid] == 0)
{
new pln[256];
GetPlayerName(playerid, pln, sizeof(pln));
gTeam[playerid] = PlayerInfo[playerid][pTeam];
if (gTeam[playerid] == 2 && (strcmp(pln, "Dir", true) == 0))
{
gTeam[playerid] = 3;
PlayerInfo[playerid][pTeam] = 3;
SetPlayerRandomSpawn(playerid);
SendClientMessage(playerid, 0x0259EAFF, "Police HQ: Вам запрещено быть ментом");
}
}
return 1;
}[/pwn]