Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ----------------------------------
- //
- // Team Death-Math base.
- // Created by: Pocahontas.
- //
- // ----------------------------------
- #include a_samp
- #include sscanf2
- #include dof2
- #include zcmd
- #include streamer
- enum
- {
- // Cores:
- Vermelho = 0xFF0000AA,
- Branco = -1,
- Cinza = 0xC0C0C0AA,
- Verde = 0x00FF00AA,
- Groove_Color = 0x0FEA1F96,
- Ballas_Color = 0xBC0EC096,
- // Times:
- Groove_Street = 1,
- Ballas = 2,
- // Dialog's:
- Login = 0,
- Registro = 1
- };
- enum PlayerInfo
- {
- Administrador,
- Matou,
- Morreu,
- Dinheiro,
- Banco,
- Team,
- bool:Logado
- };
- new Salvamento[MAX_PLAYERS][PlayerInfo];
- new Kill[MAX_PLAYERS];
- new String[128];
- new Pontuacao[3];
- new Veiculo[3][10];
- forward BDD(playerid, action[], password[]); // Banco de Dados.
- #define Comando:%1(%2,%3) CMD:%1(%2,%3)
- #define SendClientMessageToAllFormat(%0,%1,%2) format(String, sizeof String, %1, %2) && SendClientMessageToAll(%0, String)
- #define SendClientMessageFormat(%0,%1,%2,%3) format(String, sizeof String, %2, %3) && SendClientMessage(%0, %1, String)
- #define Nome_Projeto "Team death math - Base v0.1"
- main()
- {
- print("\n----------------------------------");
- print(" TDM - BASE by Pocahontas");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("TDM");
- SendRconCommand("hostname "Nome_Projeto#);
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- // Pickups:
- AddStaticPickup(1274, 23, 1480.8556, -1772.1321, 18.7958, -1);
- AddStaticPickup(-1, 23, 834.1981, 7.2459, 1004.1870, -1);
- // 3D Texts:
- CreateDynamic3DTextLabel("Banco de Los Santos\nPrecione 'F' para entrar.", -1, 1480.8556, -1772.1321, 18.7958, 10.0);
- CreateDynamic3DTextLabel("Banco de Los Santos\nComandos Dísponiveis:\n/transferir - /transferiroff - /extrato - /sacar - /depositar.", -1, 834.1981, 7.2459, 1004.1870, 10.0);
- // Grove Street
- for(new loop = 105; loop < 108; loop ++)
- AddPlayerClass(loop, 2509.7781, -1674.8879, 13.5491, 50.8363, 24, 500, 30, 500, 28, 1500);
- // Ballas
- for(new loop = 102; loop < 105; loop ++)
- AddPlayerClass(loop, 1075.0508, -1204.6870, 18.0800, 180.9501, 24, 500, 30, 500, 28, 1500);
- // Veículos Ballas:
- Veiculo[Ballas][0] = AddStaticVehicle(418,1085.7220,-1249.2032,15.9200,268.7770,5,5); // Veículo Ballas
- Veiculo[Ballas][1] = AddStaticVehicle(565,1085.1257,-1242.5172,15.4503,271.7016,5,5); // Veículo Ballas
- Veiculo[Ballas][2] = AddStaticVehicle(600,1085.7804,-1237.3239,15.5436,271.9027,5,5); // Veículo Ballas
- Veiculo[Ballas][3] = AddStaticVehicle(522,1087.5216,-1214.3868,17.3763,288.0798,5,5); // Veículo Ballas
- Veiculo[Ballas][4] = AddStaticVehicle(522,1087.6760,-1215.5813,17.3727,278.6648,5,5); // Veículo Ballas
- Veiculo[Ballas][5] = AddStaticVehicle(554,1092.4329,-1219.0280,17.8914,2.2093,5,5); // Veículo Ballas
- Veiculo[Ballas][6] = AddStaticVehicle(492,1097.9784,-1218.8232,17.5930,358.4544,5,5); // Veículo Ballas
- Veiculo[Ballas][7] = AddStaticVehicle(580,1104.0320,-1218.9852,17.6051,3.2421,5,5); // Veículo Ballas
- Veiculo[Ballas][8] = AddStaticVehicle(567,1110.3269,-1218.7145,17.6813,359.0785,5,5); // Veículo Ballas
- Veiculo[Ballas][9] = AddStaticVehicle(560,1085.6012,-1232.0308,15.7542,271.7858,5,5); // Veículo Ballas
- // Veículos Groove Street:
- Veiculo[Groove_Street][0] = AddStaticVehicle(600,2484.4436,-1654.7025,13.0795,113.5418,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][1] = AddStaticVehicle(560,2508.7129,-1660.2385,13.4829,92.9735,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][2] = AddStaticVehicle(580,2485.0789,-1683.5950,13.2193,85.2037,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][3] = AddStaticVehicle(565,2493.2585,-1683.2814,13.0326,87.2719,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][4] = AddStaticVehicle(522,2500.4136,-1685.0634,13.0160,38.1701,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][5] = AddStaticVehicle(522,2501.3826,-1684.1349,12.9967,37.6968,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][6] = AddStaticVehicle(492,2510.3350,-1676.9670,13.3415,58.3662,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][7] = AddStaticVehicle(567,2514.7153,-1671.9999,13.5861,68.0075,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][8] = AddStaticVehicle(554,2512.5115,-1664.3812,13.6795,99.0274,86,86); // Veículo Groove Street
- Veiculo[Groove_Street][9] = AddStaticVehicle(418,2503.0981,-1654.8083,13.6077,109.3788,86,86); // Veículo Groove Street
- return 1;
- }
- public OnGameModeExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerCameraPos(playerid, 1024.4758,-2160.1909,39.8466);
- SetPlayerCameraLookAt(playerid, 1018.5209,-2160.5066,38.5108);
- SetPlayerPos(playerid, 1009.5659,-2161.0220,36.4699);
- SetPlayerFacingAngle(playerid, 273.9439);
- SetPlayerInterior(playerid, 0);
- switch( classid )
- {
- case 0..3: Salvamento[playerid][Team] = Groove_Street;
- case 4..6: Salvamento[playerid][Team] = Ballas;
- }
- format(String, sizeof String, "~r~%s", GetPlayerTeamName(playerid));
- GameTextForPlayer(playerid, String, 2000, 1);
- return ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
- }
- public OnPlayerConnect(playerid)
- {
- new file[70];
- format(file, sizeof file, "Contas/%s.ini", Nome(playerid));
- Kill[playerid] = 0;
- Salvamento[playerid][Logado] = false;
- SetPlayerMapIcon(playerid, 52, 834.1981, 7.2459, 1004.1870, 52, 0, MAPICON_GLOBAL);
- // ------------------------------------------------
- for(new clear; clear < 100; ++ clear) // Loop para executar a limpeza do chat.
- SendClientMessage(playerid, Branco, " ");
- // ------------------------------------------------
- if(DOF2_FileExists(file))
- {
- ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "Fazendo seu login:", "Conta cadastrada! Digite sua senha para entrar no servidor.", "Entrar", "Sair");
- }
- else
- {
- ShowPlayerDialog(playerid, Registro, DIALOG_STYLE_PASSWORD, "Fazendo seu cadastro:", "Conta não cadastrada! Digite sua senha para se cadastrar no servidor.", "Cadastrar", "Sair");
- }
- SendClientMessage(playerid, Cinza, "OBS: Você precisa precionar 'T' antes de digitar algo.");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Salvamento[i][Logado])
- {
- BDD(i, "Save", #);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(!Salvamento[playerid][Logado]) return Kick(playerid);
- SetPlayerTeamColor(playerid);
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, Salvamento[playerid][Dinheiro]);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Salvamento[playerid][Morreu] --;
- Salvamento[killerid][Matou] ++;
- Kill[killerid] ++;
- Kill[playerid] = 0;
- Pontuacao[Salvamento[playerid][Team]] ++;
- if(Kill[playerid] >= 2)
- {
- SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Neutralizado ] %s", Nome(killerid), Nome(playerid));
- }
- else
- {
- switch( Kill[killerid] )
- {
- case 1: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Matou ] %s", Nome(killerid), Nome(playerid));
- case 2: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Double Kill ] %s", Nome(killerid), Nome(playerid));
- case 3: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Triple Kill ] %s", Nome(killerid), Nome(playerid));
- case 4: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Quadra Kill ] %s", Nome(killerid), Nome(playerid));
- case 5: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Penta Kill ] %s", Nome(killerid), Nome(playerid));
- case 6: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Hexa Kill ] %s", Nome(killerid), Nome(playerid));
- case 7..1000: SendClientMessageToAllFormat(Vermelho, "[Kill System] %s [ Chain Killer ] %s", Nome(killerid), Nome(playerid));
- }
- }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- format(String, sizeof String, "[ Chat Team ] %s[ID:%d] diz: %s.", Nome(playerid), playerid, text);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Salvamento[i][Team] == Salvamento[playerid][Team])
- SendClientMessage(i, Branco, String);
- }
- return false;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case Login:
- {
- if (!response) return ( Kick(playerid) );
- if (response) return ( cmd_login(playerid, inputtext) );
- }
- case Registro:
- {
- if (!response) return ( Kick(playerid) );
- if (response) return ( cmd_cadastrar(playerid, inputtext) );
- }
- }
- return true;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new newstate = GetPlayerState(playerid);
- if(newkeys == 16 && newstate == PLAYER_STATE_ONFOOT)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1480.8556, -1772.1321, 18.7958)) // Entrada Banco.
- {
- SetPlayerPos(playerid, 834.1981, 7.2459, 1004.1870);
- SetPlayerInterior(playerid, 3);
- SendClientMessage(playerid, Vermelho, "Você entrou no banco.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 834.1981, 7.2459, 1004.1870)) // Saída Banco.
- {
- SetPlayerPos(playerid, 1480.8556, -1772.1321, 18.7958);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, Vermelho, "Você saiu do banco.");
- }
- }
- return true;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vehicle = GetPlayerVehicleID(playerid);
- if(newstate == PLAYER_STATE_DRIVER)
- {
- for(new v = 0; v < 10; v++)
- {
- if(vehicle == Veiculo[Groove_Street][v])
- {
- if(Salvamento[playerid][Team] != Groove_Street)
- return RemovePlayerFromVehicle(playerid);
- }
- if(vehicle == Veiculo[Ballas][v])
- {
- if(Salvamento[playerid][Team] != Ballas)
- return RemovePlayerFromVehicle(playerid);
- }
- }
- }
- return true;
- }
- public BDD(playerid, action[], password[])
- {
- new file[70];
- format(file, sizeof file, "Contas/%s.ini", Nome(playerid));
- if(!strcmp(action, "Cadastro", true))
- {
- DOF2_CreateFile(file);
- DOF2_SetString(file, "Senha", password);
- DOF2_SetInt(file, "Administrador", 0);
- DOF2_SetInt(file, "Matou", 0);
- DOF2_SetInt(file, "Morreu", 0);
- DOF2_SetInt(file, "Dinheiro", 350);
- DOF2_SetInt(file, "Banco", 0);
- DOF2_SaveFile();
- Salvamento[playerid][Administrador] = DOF2_GetInt(file, "Administrador");
- Salvamento[playerid][Matou] = DOF2_GetInt(file, "Matou");
- Salvamento[playerid][Morreu] = DOF2_GetInt(file, "Morreu");
- Salvamento[playerid][Dinheiro] = DOF2_GetInt(file, "Dinheiro");
- Salvamento[playerid][Banco] = DOF2_GetInt(file, "Banco");
- SendClientMessage(playerid, Branco, "Seja bem vindo ao seu servidor!");
- Salvamento[playerid][Logado] = true;
- }
- if(!strcmp(action, "Login", true))
- {
- if(!strcmp(password, DOF2_GetString(file, "Senha"), true))
- {
- Salvamento[playerid][Administrador] = DOF2_GetInt(file, "Administrador");
- Salvamento[playerid][Matou] = DOF2_GetInt(file, "Matou");
- Salvamento[playerid][Morreu] = DOF2_GetInt(file, "Morreu");
- Salvamento[playerid][Dinheiro] = DOF2_GetInt(file, "Dinheiro");
- Salvamento[playerid][Banco] = DOF2_GetInt(file, "Banco");
- SendClientMessage(playerid, Branco, "Seja bem vindo ao seu servidor!");
- Salvamento[playerid][Logado] = true;
- }
- else
- {
- SendClientMessage(playerid, Cinza, "Senha incorreta, tente novamente ( /login )");
- }
- }
- if(!strcmp(action, "Save", true))
- {
- DOF2_SetInt(file, "Administrador", Salvamento[playerid][Administrador]);
- DOF2_SetInt(file, "Matou", Salvamento[playerid][Matou]);
- DOF2_SetInt(file, "Morreu", Salvamento[playerid][Morreu]);
- DOF2_SetInt(file, "Banco", Salvamento[playerid][Banco]);
- DOF2_SetInt(file, "Dinheiro", Salvamento[playerid][Dinheiro]);
- DOF2_SaveFile();
- }
- return true;
- }
- // ============================== [ Comandos ] ============================== //
- Comando:ajuda(playerid, params[])
- {
- SendClientMessage(playerid, Vermelho, " --------------------------------------------------------------------------------- ");
- SendClientMessage(playerid, Verde, "Comandos dísponiveis:");
- SendClientMessage(playerid, Branco, "Cadastro: /login - /cadastrar.");
- SendClientMessage(playerid, Branco, "Geral: /all - /admins - /report - /status - /criarveh - /placar.");
- SendClientMessage(playerid, Branco, "Banco: /transferir - /transferiroff - /extrato - /sacar - /depositar.");
- SendClientMessage(playerid, Vermelho, " --------------------------------------------------------------------------------- ");
- return true;
- }
- Comando:placar(playerid, params[])
- {
- if(Pontuacao[Groove_Street] > Pontuacao[Ballas])
- {
- SendClientMessageFormat(playerid, Groove_Color, "A Groove Street lidera o TDM com o placar %d/%d.", Pontuacao[Groove_Street], Pontuacao[Ballas]);
- }
- else if(Pontuacao[Groove_Street] < Pontuacao[Ballas])
- {
- SendClientMessageFormat(playerid, Ballas_Color, "Os Ballas lidera o TDM com o placar %d/%d.", Pontuacao[Ballas], Pontuacao[Groove_Street]);
- }
- else if(Pontuacao[Groove_Street] == Pontuacao[Ballas])
- {
- SendClientMessageFormat(playerid, Branco, "O TDM está empatado com %d pontos para a Groove Street e %d pontos para os Ballas.", Pontuacao[Groove_Street], Pontuacao[Ballas]);
- }
- return true;
- }
- Comando:criarveh(playerid, params[])
- {
- new v[3];
- new Float: p[4];
- if(sscanf(params,"iii",v[0],v[1],v[2]))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /criarveh [model id] [color] [color]");
- GetPlayerPos(playerid, p[0], p[1], p[2]) && GetPlayerFacingAngle(playerid, p[3]);
- CreateVehicle(v[0],p[0],p[1],p[2],p[3],v[1],v[2],-1);
- return true;
- }
- Comando:status(playerid, params[])
- return SendClientMessage(playerid, Branco, " ") && SendClientMessageFormat(playerid, Branco, "Dinheiro: [$%d] Banco: [$%d] Matou/Morreu: [%d/%d]", Salvamento[playerid][Dinheiro], Salvamento[playerid][Banco], Salvamento[playerid][Matou], Salvamento[playerid][Morreu]) && SendClientMessage(playerid, Branco, " ");
- Comando:admins(playerid, params[])
- {
- SendClientMessage(playerid, Vermelho, "Administradores Online:");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Salvamento[i][Administrador] > 0)
- SendClientMessageFormat(playerid, Branco, "[ADMIN]: %s Nivel: [%d]", Nome(i), Salvamento[i][Administrador]);
- }
- return true;
- }
- Comando:report(playerid, params[])
- {
- new text[128];
- if(!Salvamento[playerid][Logado])
- return SendClientMessage(playerid, Cinza, "Você ainda não está logado.");
- if(sscanf(params, "s[128]", text))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /report [text]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Salvamento[i][Administrador] > 0)
- SendClientMessageFormat(i, Vermelho, "[REPORT] %s[ID:%d] reportou: %s.", Nome(playerid), playerid, text);
- }
- SendClientMessage(playerid, Cinza, "Report enviado para os administradores online.");
- return true;
- }
- Comando:all(playerid, params[])
- {
- new text[300];
- if(!Salvamento[playerid][Logado])
- return SendClientMessage(playerid, Cinza, "Você não está logado.");
- if(sscanf(params, "s[300]", text))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /all [mensagem]");
- SendClientMessageToAllFormat(Verde, "[ Chat All ] %s[ID:%d] diz: %s.", Nome(playerid), playerid, text);
- return true;
- }
- Comando:cadastrar(playerid, params[])
- {
- new password[50];
- new file[70];
- format(file, sizeof file, "Contas/%s.ini", Nome(playerid));
- if(DOF2_FileExists(file))
- return SendClientMessage(playerid, Cinza, "Conta já existente.");
- if(sscanf(params,"s[50]",password))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /cadastrar [password]");
- if(!strlen(password))
- return SendClientMessage(playerid, Cinza, "Digite uma senha.");
- BDD(playerid, "Cadastro", password);
- return true;
- }
- Comando:login(playerid, params[])
- {
- new password[50];
- new file[70];
- format(file, sizeof file, "Contas/%s.ini", Nome(playerid));
- if(!DOF2_FileExists(file))
- return SendClientMessage(playerid, Cinza, "Conta não existente.");
- if(Salvamento[playerid][Logado])
- return SendClientMessage(playerid, Cinza, "Você já está logado.");
- if(sscanf(params,"s[50]",password))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /login [password]");
- if(!strlen(password))
- return SendClientMessage(playerid, Cinza, "Digite uma senha.");
- BDD(playerid, "Login", password);
- return true;
- }
- // Comandos Banco:
- Comando:transferir(playerid, params[])
- {
- new parametro[2];
- if(!IsPlayerInRangeOfPoint(playerid, 7.0, 834.1981, 7.2459, 1004.1870))
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não está no banco.");
- if(sscanf(params, "ii", parametro[0], parametro[1]))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /transferir [playerid] [quantia]");
- if(parametro[0] == playerid)
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não pode transferir dinheiro para si mesmo.");
- if(!IsPlayerConnected(parametro[0]))
- return SendClientMessage(playerid, Cinza, "[ERRO] Jogador não conectado, use /transferiroff.");
- if(parametro[1] > Salvamento[playerid][Banco])
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não possuí esta quantia.");
- Salvamento[playerid][Banco] -= parametro[1];
- Salvamento[parametro[0]][Banco] += parametro[1];
- SendClientMessageFormat(playerid, Branco, "Você transferiu $%d para o jogador %s.", parametro[1], Nome(parametro[0]));
- SendClientMessageFormat(parametro[0], Branco, "Você recebeu $%d do jogador %s em uma transferencia bancaria.", parametro[1], Nome(playerid));
- return true;
- }
- Comando:transferiroff(playerid, params[])
- {
- new quantia;
- new jogador[MAX_PLAYER_NAME];
- new file[70];
- if(!IsPlayerInRangeOfPoint(playerid, 7.0, 834.1981, 7.2459, 1004.1870))
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não está no banco.");
- if(sscanf(params, "s[24]i", jogador, quantia))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /transferiroff [nome do jogador] [quantia] ( Só use se o jogador estiver offline, caso contrario seu dinheiro será perdido. )");
- if(quantia > Salvamento[playerid][Banco])
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não possuí esta quantia.");
- format(file, sizeof file, "Contas/%s.ini", jogador);
- DOF2_SetInt(file, "Banco", quantia);
- DOF2_SaveFile();
- Salvamento[playerid][Banco] -= quantia;
- SendClientMessageFormat(playerid, Branco, "Você transferiu $%d para o jogador %s.", quantia, jogador);
- return true;
- }
- Comando:extrato(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 7.0, 834.1981, 7.2459, 1004.1870))
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não está no banco.");
- SendClientMessageFormat(playerid, Cinza, "Você possuí $%d,00 na sua conta bancária.", Salvamento[playerid][Banco]);
- return true;
- }
- Comando:sacar(playerid, params[])
- {
- new quantia;
- if(!IsPlayerInRangeOfPoint(playerid, 7.0, 834.1981, 7.2459, 1004.1870))
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não está no banco.");
- if(sscanf(params,"i",quantia))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /sacar [quantia]");
- if(quantia > Salvamento[playerid][Banco])
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não possuí esta quantia.");
- Salvamento[playerid][Banco] -= quantia;
- Salvamento[playerid][Dinheiro] += quantia;
- SendClientMessageFormat(playerid, Cinza, "Você sacou $%d,00.", quantia);
- GivePlayerMoney(playerid, quantia);
- return true;
- }
- Comando:depositar(playerid, params[])
- {
- new quantia;
- if(!IsPlayerInRangeOfPoint(playerid, 7.0, 834.1981, 7.2459, 1004.1870))
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não está no banco.");
- if(sscanf(params,"i",quantia))
- return SendClientMessage(playerid, Cinza, "Sintaxe: /depositar [quantia]");
- if(quantia > Salvamento[playerid][Dinheiro])
- return SendClientMessage(playerid, Cinza, "[ERRO] Você não possuí esta quantia.");
- Salvamento[playerid][Banco] += quantia;
- Salvamento[playerid][Dinheiro] -= quantia;
- SendClientMessageFormat(playerid, Cinza, "Você depositou $%d,00.", quantia);
- GivePlayerMoney(playerid, -quantia);
- return true;
- }
- //
- stock Nome(playerid)
- {
- new givename[MAX_PLAYER_NAME];
- GetPlayerName(playerid, givename, sizeof givename);
- return ( givename );
- }
- stock GetPlayerTeamName(playerid)
- {
- new team_name[20];
- switch( Salvamento[playerid][Team] )
- {
- case Groove_Street: team_name = "Groove Street";
- case Ballas: team_name = "Ballas";
- }
- return ( team_name );
- }
- stock SetPlayerTeamColor(playerid)
- {
- switch( Salvamento[playerid][Team] )
- {
- case Groove_Street: SetPlayerColor(playerid, Groove_Color);
- case Ballas: SetPlayerColor(playerid, Ballas_Color);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment