new bool:PoliceGetsWeapons = true;
new bool:MafiaGetsWeapons = true;
new APoliceWeapons[4] = {24, 25, 31, 29};
new PoliceWeaponsAmmo = 5000;
new AMafiaWeapons[3] = {22, 30, 32};
new MafiaWeaponsAmmo = 5000;
case ClassPolice: // Police class
{
format(missiontext, sizeof(missiontext), Police_NoJobText); // Preset the missiontext
SetPlayerColor(playerid, ColorClassPolice); // Set the playercolor (chatcolor for the player and color on the map)
// Start the PlayerCheckTimer to scan <a href="http://cityadspix.com/tsclick-BQBE4NPP-VRMIQUYF?url=http%3A%2F%2Fwww.enter.ru%2Fproduct%2Felectronics%2Figra-dlya-ps-vita-need-for-speed-most-wanted-2060401013472&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9<=2&tl=3&im=Mjc3NS0wLTE0MTgxMjM1ODYtMTQ3Njg5MDg%3D&fid=NDQ1NzU2Nzc1&prdct=023008390e390c3206&kw=for%20wanted" target="_blank" alt="Need for Speed: Most Wanted" title="Need for Speed: Most Wanted" style="">for wanted</a> players (be sure the timer has been destroyed first)
KillTimer(APlayerData[playerid][PlayerCheckTimer]);
APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Police_CheckWantedPlayers", 1000, true, "i", playerid);
// Check if the police player can get weapons
if (PoliceGetsWeapons == true)
{
// Give up to 12 weapons to the player
for (new i; i < 4; i++)
GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo);
}
}
case ClassMafia: // Mafia class
{
format(missiontext, sizeof(missiontext), Mafia_NoJobText); // Preset the missiontext
SetPlayerColor(playerid, ColorClassMafia); // Set the playercolor (chatcolor for the player and color on the map)
// Start the PlayerCheckTimer to scan for players that carry mafia-loads (be sure the timer has been destroyed first)
KillTimer(APlayerData[playerid][PlayerCheckTimer]);
APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Mafia_CheckMafiaLoads", 1000, true, "i", playerid);
// Check if the mafia player can get weapons
if (MafiaGetsWeapons == true)
{
// Give up to 12 weapons to the player
for (new i; i < 3; i++)
GivePlayerWeapon(playerid, AMafiaWeapons[i], MafiaWeaponsAmmo);
}
}
#define ClassPolice 4 #define ClassMafia 5
public OnPlayerRequestSpawn(playerid)
public OnPlayerRequestClass(playerid, classid)
GameModeInit_Classes() { AddPlayerClass(133, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 0 = Truck driver AddPlayerClass(201, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 1 = Truck driver AddPlayerClass(202, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 2 = Truck driver AddPlayerClass(234, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 3 = Truck driver AddPlayerClass(258, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 4 = Truck driver AddPlayerClass(261, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 5 = Truck driver AddPlayerClass(206, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 6 = Truck driver AddPlayerClass(34, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 7 = Truck driver AddPlayerClass(255, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 8 = Bus driver AddPlayerClass(253, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 9 = Bus driver AddPlayerClass(61, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 10 = Pilot AddPlayerClass(280, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 11 = Police AddPlayerClass(282, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 12 = Police AddPlayerClass(283, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 13 = Police AddPlayerClass(111, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 14 = Mafia AddPlayerClass(112, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 15 = Mafia AddPlayerClass(113, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 16 = Mafia AddPlayerClass(250, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 17 = Courier AddPlayerClass(193, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 18 = Courier AddPlayerClass(50, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 19 = Assistance AddPlayerClass(16, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 20 = Roadworker AddPlayerClass(27, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 21 = Roadworker AddPlayerClass(260, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // Class 22 = Roadworker }
#define ClassPolice 4
#define ClassMafia 5
case 11 .. 13:
{
//Police stuff...
}
case 14 .. 16:
{
//Mafia stuff...
}
// Define classes #define ClassTruckDriver 1 #define ClassBusDriver 2 #define ClassPilot 3 #define ClassPolice 4 #define ClassMafia 5 #define ClassCourier 6 #define ClassAssistance 7 #define ClassRoadWorker 8
public OnPlayerRequestClass(playerid, classid)
case 11, 12, 13: // Classes that will be police { // Display the name of the class GameTextForPlayer(playerid, TXT_ClassPolice, 3000, 4); // Store the class for the player (police) APlayerData[playerid][PlayerClass] = ClassPolice; } case 14, 15, 16: // Classes that will be mafia { // Display the name of the class GameTextForPlayer(playerid, TXT_ClassMafia, 3000, 4); // Store the class for the player (mafia) APlayerData[playerid][PlayerClass] = ClassMafia; }