Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jaspawnou[playerid] = false;
- APlayerData[playerid][ssSpawn] = 0;
- sSpawn[playerid] = true;
- new bool:sSpawn[MAX_PLAYERS];
- new bool:jaspawnou[MAX_PLAYERS];
- #define DIALOG_SAPW 5570
- if(dialogid == DIALOG_SAPW)
- {
- if(!response)
- {
- new classid;
- sSpawn[playerid] = true;
- jaspawnou[playerid] = false;
- SetPVarInt(playerid,"Escolhendo_Classe",1);
- TextDrawShowForPlayer(playerid, ProfsTextD[playerid]);
- switch (classid)
- {
- case 0, 1, 2, 3, 4, 5, 6, 7:
- {
- TextDrawSetString(ProfsTextD[playerid], "CAMINHONEIRO");
- //hehe
- APlayerData[playerid][PlayerClass] = ClassTruckDriver;
- }
- case 8, 9, 10:
- {
- TextDrawSetString(ProfsTextD[playerid], "~g~MOSTORISTA DE ONIBUS");
- APlayerData[playerid][PlayerClass] = ClassBusDriver;
- }
- case 11, 12:
- {
- TextDrawSetString(ProfsTextD[playerid], "PILOTO");
- APlayerData[playerid][PlayerClass] = ClassPilot;
- }
- case 13, 14, 15, 16, 17, 18:
- {
- TextDrawSetString(ProfsTextD[playerid], "~b~POLICIAL");
- APlayerData[playerid][PlayerClass] = ClassPolice;
- }
- case 19, 20, 21:
- {
- TextDrawSetString(ProfsTextD[playerid], "~r~MAFIOSO");
- APlayerData[playerid][PlayerClass] = ClassMafia;
- }
- case 22, 23:
- {
- TextDrawSetString(ProfsTextD[playerid], "~p~AGENTE DOS CORREIOS");
- APlayerData[playerid][PlayerClass] = ClassCourier;
- }
- case 24:
- {
- TextDrawSetString(ProfsTextD[playerid], "~g~~h~MECANICO");
- APlayerData[playerid][PlayerClass] = ClassAssistance;
- }
- case 25, 26, 27:
- {
- TextDrawSetString(ProfsTextD[playerid], "~y~OPERARIO DO DNIT");
- APlayerData[playerid][PlayerClass] = ClassRoadWorker;
- }
- case 28, 29, 30:
- {
- TextDrawSetString(ProfsTextD[playerid], "~b~~h~MEDICO");
- APlayerData[playerid][PlayerClass] = ClassMedic;
- }
- case 31, 32:
- {
- TextDrawSetString(ProfsTextD[playerid], "~b~~h~ADVOGADO");
- APlayerData[playerid][PlayerClass] = ClassAdvogado;
- }
- case 33, 34:
- {
- TextDrawSetString(ProfsTextD[playerid], "~b~~h~BOMBEIRO");
- APlayerData[playerid][PlayerClass] = ClassBombeiro;
- }
- }
- return 1;
- }
- switch (APlayerData[playerid][PlayerClass])
- {
- case ClassTruckDriver:
- {
- switch (listitem)
- {
- case 0:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1376.6407,1020.3521,10.8203);
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}LVA Freight Depot{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- }
- case 1:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -2135.7871,-247.5011,36.1588);
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Doherty Depot{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- }
- case 2:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2185.7600,-2256.5200,14.7734);
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Armazem LS{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- }
- case 3:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -2424.0337,2116.4568,12.2353);
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Bay Side{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- }
- case 4:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -3114.7031,1916.2468,12.0739);
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- }
- case 5:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2725.3513,-2569.1050,3.0000);
- }
- case 6:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -2943.7280,483.8671,4.9103);
- }
- case 7:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -2195.3701,2410.4751,4.9619);
- }
- case 8:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2185.7600,-2256.5200,14.7734);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- // Check if this houseindex is occupied
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 9:
- {
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2185.7600,-2256.5200,14.7734);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- // Get the business-id
- BusID = APlayerData[playerid][Business][i];
- // Check if this businessindex is occupied
- if (BusID != 0)
- {
- // Get the business-type
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassBusDriver:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1782.1699, -1863.9131, 13.5745);
- }
- case 1:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1983.0, 110.0, 27.7);
- }
- case 2:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1060.0, 1260.0, 11.0);
- }
- case 3:
- {
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 4:
- {
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassPilot:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2010.0, -2345.0, 13.6);
- }
- case 1:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1211.0, -105.0, 14.2);
- }
- case 2:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1630.0, 1615.0, 10.9);
- }
- case 3:
- {
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 4:
- {
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassPolice:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1568.5, -1693.5, 6.0);
- }
- case 1:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1590.0, 716.25, -5.0);
- }
- case 2:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2275.0, 2460.0, 10.9);
- }
- case 3:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -212.8061,979.6884,19.3298);
- }
- case 4:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 24.1553,-2646.3928,40.4632);
- }
- case 5:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 6:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassMafia:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2822.5, 898.5, 10.8);
- }
- case 1:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 2:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassCourier:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 798.0, -618.75, 16.4);
- }
- case 1:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1849.25, -135.0, 12.0);
- }
- case 2:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1050.5, 1931.0, 10.9);
- }
- case 3:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -2080.3877, -207.6221, 35.3203);
- }
- case 4:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 5:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassAssistance:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 211.25, 24.75, 2.6);
- }
- case 1:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 2:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassRoadWorker:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1866.25, -1715.25, 22.7);
- }
- case 1:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 2:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassMedic:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1007.5084,1069.9950,11.0000);
- }
- case 1:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1182.2202,-1324.1368,13.5811);
- }
- case 2:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1943.8208,563.5020,35.1985);
- }
- case 3:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 4:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassAdvogado:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 2288.6077,2426.9941,10.8203);
- }
- case 1:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1480.6124,-1767.0293,18.7958);
- }
- case 2:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -1605.8877,717.2569,12.0448);
- }
- case 3:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 4:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- case ClassBombeiro:
- {
- switch (listitem)
- {
- case 0:
- {
- RewardPlayer(playerid, -200, 0);
- SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, -2024.7880,67.1375,28.4387);
- }
- case 1:
- {
- SpawnPlayer(playerid);
- new HouseList[1000];
- for (new i; i < MAX_HOUSESPERPLAYER; i++)
- {
- if (APlayerData[playerid][Houses][i] != 0)
- format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
- else
- format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
- }
- ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
- }
- case 2:
- {
- SpawnPlayer(playerid);
- new BusinessList[1000], BusID, BusType, Earnings;
- for (new i; i < MAX_BUSINESSPERPLAYER; i++)
- {
- BusID = APlayerData[playerid][Business][i];
- if (BusID != 0)
- {
- BusType = ABusinessData[BusID][BusinessType];
- Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
- format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
- }
- else
- format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
- }
- ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
- }
- }
- }
- }
- }
- public OnPlayerRequestSpawn(playerid)
- {
- if(APlayerData[playerid][ssSpawn] == 5)
- {
- SendClientMessage(playerid, -1, "{FF0000}Voce foi kickado por suspeita de hack, lag ou zuar.");
- Kick(playerid);
- return 0;
- }
- if(sSpawn[playerid] == false)
- {
- return 0;
- }
- new Index, Float:x, Float:y, Float:z, Float:Angle, Name[24], Msg[128];
- // Get the player's name
- GetPlayerName(playerid, Name, sizeof(Name));
- // Choose a random spawnlocation based on the player's class
- switch (APlayerData[playerid][PlayerClass])
- {
- case ClassTruckDriver:
- {
- Index = random(sizeof(ASpawnLocationsTrucker)); // Get a random array-index to chose a random spawnlocation
- x = ASpawnLocationsTrucker[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsTrucker[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsTrucker[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsTrucker[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - LVA Freight Depot\r\n2 - Doherty Depot\r\n3 - Armazem LS\r\n4 - Bay Side\r\n5 - Resgate Maritimo\r\n6 - Los Santos [Maritimo]\r\n7 - San Fierro [Maritimo]\r\n8 - Bay Side [Maritimo]\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancelar");
- printf("%s entrou como um caminhoneiro", Name);
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FF9900}entrou como um {ffffff}caminhoneiro{FF9900}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassBusDriver:
- {
- Index = random(sizeof(ASpawnLocationsBusDriver));
- x = ASpawnLocationsBusDriver[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsBusDriver[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsBusDriver[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsBusDriver[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- printf("%s entrou como um motorista de onibus", Name);
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {00FFFF}entrou como um {ffffff}motorista de ônibus{00FFFF}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassPilot:
- {
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- x = ASpawnLocationsPilot[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsPilot[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsPilot[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsPilot[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- Index = random(sizeof(ASpawnLocationsPilot));
- printf("%s entrou como um piloto", Name);
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {008080}entrou como um {ffffff}piloto de avião{008080}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassPolice:
- {
- // Count the number of normal players (all classes except police) and count the amount of police players
- new NormalPlayers, PolicePlayers, bool:CanSpawnAsCop = false;
- // Block this check if PlayersBeforePolice is set to 0 (this allows anyone to join as police)
- if (PlayersBeforePolice > 0)
- {
- // Loop through all players
- for (new pid; pid < MAX_PLAYERS; pid++)
- {
- // Exclude this player, as he doesn't have a class yet, he's still choosing here
- if (pid != playerid)
- {
- // Also exclude all players who are still in the class-selection screen, as they don't have a class selected yet
- if (GetPlayerInterior(pid) != 14)
- {
- // Check if this player is logged in
- if (APlayerData[pid][LoggedIn] == true)
- {
- // Count the amount of normal players and police players
- switch (APlayerData[pid][PlayerClass])
- {
- case ClassPolice:
- PolicePlayers++;
- case ClassTruckDriver, ClassBusDriver, ClassPilot, ClassMafia, ClassCourier, ClassAssistance, ClassRoadWorker, ClassMedic, ClassAdvogado, ClassBombeiro:
- NormalPlayers++;
- }
- }
- }
- }
- }
- // Check if there are less police players than allowed
- if (PolicePlayers < (NormalPlayers * PlayersBeforePolice))
- CanSpawnAsCop = true; // There are less police players than allowed, so the player can choose this class
- else
- CanSpawnAsCop = false; // The maximum amount of police players has been reached, the player can't choose to be a cop
- // Check if the player isn't allowed to spawn as police
- if (CanSpawnAsCop == false)
- {
- // Let the player know the maximum amount of cops has been reached
- GameTextForPlayer(playerid, "O número máximo de COP's online foi atingido.", 5000, 4);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}O número máximo de COP's online foi atingido, por favor selecione outra classe.");
- LP[playerid] = false;
- return 0; // Don't allow the player to spawn as police player
- }
- }
- if (APlayerData[playerid][PlayerScore] < 1200)
- {
- // Let the player know he needs 100 scorepoints
- GameTextForPlayer(playerid, "~y~Voce precisa de 1200 pontos para entrar na Policia.", 5000, 4);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Você precisa de 1200 pontos para entrar na policia");
- return 0; // Don't allow the player to spawn as police player
- }
- // If the player has a wanted level
- if (GetPlayerWantedLevel(playerid) > 0)
- {
- // Let the player know he cannot have a wanted level to join police
- GameTextForPlayer(playerid, "Voce nao pode ser um policial enquanto estiver sendo procurado", 5000, 4);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Você não pode ser um policial enquanto estiver sendo procurado.");
- return 0; // Don't allow the player to spawn as police player
- }
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n4 - Fort Carson\r\n5 - Flint County\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- printf("%s entrou como um policial", Name);
- Index = random(sizeof(ASpawnLocationsPolice));
- x = ASpawnLocationsPolice[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsPolice[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsPolice[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsPolice[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {0000FF}entrou como um {ffffff}policial{0000FF}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- }
- case ClassMafia:
- {
- if (APlayerData[playerid][PlayerScore] < 800)
- {
- GameTextForPlayer(playerid, "~y~Voce precisa de 800 pontos para entrar na Mafia", 5000, 4);
- SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Você precisa de 800 pontos para entrar na Máfia");
- return 0;
- }
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- printf("%s entrou como um mafioso", Name);
- Index = random(sizeof(ASpawnLocationsMafia));
- x = ASpawnLocationsMafia[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsMafia[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsMafia[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsMafia[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {8000FF}entrou como um {ffffff}mafioso{8000FF}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassCourier:
- {
- printf("%s entrou como um agente de correio", Name);
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n4 - Biblioteca Doherty\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- Index = random(sizeof(ASpawnLocationsCourier));
- x = ASpawnLocationsCourier[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsCourier[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsCourier[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsCourier[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FF00FF}entrou como um {ffffff}agente dos correios{FF00FF}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassAssistance:
- {
- printf("%s entrou como um mecanico", Name);
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- Index = random(sizeof(ASpawnLocationsAssistance));
- x = ASpawnLocationsAssistance[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsAssistance[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsAssistance[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsAssistance[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {A5ED54}entrou como um {ffffff}mecânico{A5ED54}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassRoadWorker:
- {
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Whesttone\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- printf("%s entrou como um operario de dnit", Name);
- Index = random(sizeof(ASpawnLocationsRoadWorker));
- x = ASpawnLocationsRoadWorker[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsRoadWorker[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsRoadWorker[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsRoadWorker[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FFFF80}entrou como um {ffffff}operário do DNIT{FFFF80}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassMedic:
- {
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n2 - Los Santos\r\n3 - San Fierro\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- printf("%s entrou como um medico", Name);
- Index = random(sizeof(ASpawnLocationsMedic));
- x = ASpawnLocationsMedic[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsMedic[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsMedic[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsMedic[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {AC46CF}entrou como um {ffffff}medico{AC46CF}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassAdvogado:
- {
- if (APlayerData[playerid][PlayerScore] < 1000)
- {
- // Let the player know he needs 100 scorepoints
- SendClientMessage(playerid, 0xFFFFFFFF, "{ff0000}Requer no minimo 1000 pontos para advogado!");
- return 0; // Don't allow the player to spawn as police player
- }
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n2 - Los Santos\r\n3 - San Fierro\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- printf("%s entrou como um advogado", Name);
- Index = random(sizeof(ASpawnLocationsAdvogado));
- x = ASpawnLocationsAdvogado[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsAdvogado[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsAdvogado[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsAdvogado[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FFC87A}entrou como um {ffffff}advogado{FFC87A}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- case ClassBombeiro:
- {
- if (APlayerData[playerid][PlayerScore] < 100)
- {
- GameTextForPlayer(playerid, "~y~Voce precisa de 100 pontos de score, para entrar nos Bombeiros", 5000, 4);
- return 0;
- }
- ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - San Fierro\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
- printf("%s entrou como um bombeiro", Name);
- Index = random(sizeof(ASpawnLocationsCourier));
- x = ASpawnLocationsBombeiro[Index][SpawnX]; // Get the X-position for the spawnlocation
- y = ASpawnLocationsBombeiro[Index][SpawnY]; // Get the Y-position for the spawnlocation
- z = ASpawnLocationsBombeiro[Index][SpawnZ]; // Get the Z-position for the spawnlocation
- Angle = ASpawnLocationsCourier[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
- format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FF3030}entrou como um {ffffff}bombeiro{FF3030}.", Name, playerid);
- jaspawnou[playerid] = true;
- sSpawn[playerid] = false;
- APlayerData[playerid][ssSpawn] ++;
- SendClientMessageToAll(-1, Msg);
- LP[playerid] = true;
- }
- }
- //Spawn the player with his chosen skin at a random location based on his class
- SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), x, y, z, Angle, 0, 0, 0, 0, 0, 0);
- //SendClientMessageToAll(0x90EE90FF, Msg);
- SendClientMessageToAll(0xEEDD82FF, Msg);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement