23.07.2014, 20:55
Quote:
public OnPlayerSpawn(playerid) { if (APlayerData[playerid][RulesRead] == false) { new Msg[2000]; format(Msg, 2000, "{FFFFFF}%s1. Sempre dirigir do lado {FF0000}direito {FFFFFF}nas estradas para evitar acidentes.\n", Msg); format(Msg, 2000, "{FFFFFF}%s2. Nгo {FF0000}chingar {FFFFFF}ou {FF0000}desrespeitar {FFFFFF}os outros jogadores, eles sгo seus companheiros.\n", Msg); format(Msg, 2000, "{FFFFFF}%s3. Usar a linguagem padrгo '{FF0000}Portuguкs{FFFFFF}'.\n", Msg); format(Msg, 2000, "{FFFFFF}%s4. Nгo usar hackers ou serб banido {FF0000}permanentemente{FFFFFF}.\n", Msg); format(Msg, 2000, "{FFFFFF}%s5. Nгo {FF0000}floodar {FFFFFF}no chat, pode ser {FF0000}calado {FFFFFF}por um admin.\n", Msg); format(Msg, 2000, "{FFFFFF}%s6. Nгo roubar carros, sujeito a prisгo caso haja denuncia.\n", Msg); format(Msg, 2000, "{FFFFFF}%s7. Nunca chingue ou desrespeite um administrador, vocк serб {FF0000}banido{FFFFFF}.\n", Msg); ShowPlayerDialog(playerid, DialogRules, DIALOG_STYLE_MSGBOX, "Regras do Caminhoneiros na Estrada:", Msg, "Aceitar", TXT_DialogButtonCancel); } if (IsPlayerNPC(playerid)) return 1; if (APlayerData[playerid][LoggedIn] == false) { SendClientMessage(playerid, 0xFFFFFFFF, TXT_FailedLoginProperly); Kick(playerid); } new missiontext[200]; SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0); APlayerData[playerid][CurrentHouse] = 0; TogglePlayerClock(playerid, 0); ResetPlayerWeapons(playerid); switch (APlayerData[playerid][PlayerClass]) { case ClassTruckDriver: { format(missiontext, sizeof(missiontext), Trucker_NoJobText); SetPlayerColor(playerid, ColorClassTruckDriver); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassBusDriver: { format(missiontext, sizeof(missiontext), BusDriver_NoJobText); SetPlayerColor(playerid, ColorClassBusDriver); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassPilot: { format(missiontext, sizeof(missiontext), Pilot_NoJobText); SetPlayerColor(playerid, ColorClassPilot); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassPolice: { format(missiontext, sizeof(missiontext), Police_NoJobText); SetPlayerColor(playerid, ColorClassPolice); KillTimer(APlayerData[playerid][PlayerCheckTimer]); APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Police_CheckWantedPlayers", 1000, true, "i", playerid); for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } case ClassMafia: { format(missiontext, sizeof(missiontext), Mafia_NoJobText); SetPlayerColor(playerid, ColorClassMafia); KillTimer(APlayerData[playerid][PlayerCheckTimer]); APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Mafia_CheckMafiaLoads", 1000, true, "i", playerid); for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } case ClassCourier: { format(missiontext, sizeof(missiontext), Courier_NoJobText); SetPlayerColor(playerid, ColorClassLixeiro); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassAssistance: // Assistance class { format(missiontext, sizeof(missiontext), Assistance_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassAssistance); // Set the playercolor (chatcolor for the player and color on the map) if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } KillTimer(APlayerData[playerid][PlayerCheckTimer]); APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Assistance_CheckPlayers", 1000, true, "i", playerid); } case ClassLixeiro: { format(missiontext, sizeof(missiontext), Lixeiro_NoJobText); SetPlayerColor(playerid, ColorClassLixeiro); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassPizza: { format(missiontext, sizeof(missiontext), Pizza_NoJobText); SetPlayerColor(playerid, ColorClassPizza); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassMendigo: { format(missiontext, sizeof(missiontext), Mendigo_NoJobText); SetPlayerColor(playerid, ColorClassMendigo); if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } case ClassRoadWorker: // Roadworker class { format(missiontext, sizeof(missiontext), RoadWorker_NoJobText); // Preset the missiontext SetPlayerColor(playerid, ColorClassRoadWorker); // Set the playercolor (chatcolor for the player and color on the map) if (APlayerData[playerid][WeaponLicense] == 1) { for (new i; i < 12; i++) GivePlayerWeapon(playerid, APoliceWeapons[i], PoliceWeaponsAmmo); } else { ResetPlayerWeapons(playerid); } } } TextDrawSetString(APlayerData[playerid][MissionText], missiontext); TextDrawShowForPlayer(playerid, APlayerData[playerid][MissionText]); if (APlayerData[playerid][PlayerJailed] != 0) Police_JailPlayer(playerid, APlayerData[playerid][PlayerJailed]); return 1; |