Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include <z_cmd>
- #include <sscanf2>
- //Dialogs
- #define DIALOGO_PRIMEIRO 1
- #define DIALOG_LOGIN 2
- #define DIALOG_BUYWEAPON 3
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by Dudut");
- print("----------------------------------\n");
- }
- //variaveis globais
- forward esperarKick(playerid);
- forward farmar(playerid);
- new float:BuyWeaponX = 1948.8822, float: BuyWeaponY = 1363.6421, float:BuyWeaponZ = 9.1094;
- spawn(playerid){
- SetSpawnInfo(playerid, 0, 0,1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
- SpawnPlayer(playerid);
- return 1;
- }
- public OnGameModeInit()
- {
- AddStaticPickup(1239, 1, BuyWeaponX, BuyWeaponY, BuyWeaponZ, 0);
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 0;
- }
- public OnPlayerConnect(playerid)
- {
- /*SetPlayerPos(playerid, 2105.1279,1317.8900,48.5256);
- SetPlayerCameraPos(playerid, 2105.1279,1317.8900,48.5256);
- SetPlayerCameraLookAt(playerid, 2105.1279,1317.8900,48.5256);*/
- SendClientMessage(playerid, -1, "Carregando... Aguarde.");
- SetPlayerPos(playerid, 1986.5243,1417.5510,9.1094);
- SetPlayerCameraPos(playerid, 1986.8789,1413.7490,9.1094);
- SetCameraBehindPlayer(playerid);
- new name[29];
- GetPlayerName(playerid, name, sizeof(name));
- if (!strcmp(name, "Dudut", 0)){ // Se elas forem iguais retorna 0
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Digite sua senha:", "Confirmar", "Sair");
- }
- else{
- SendClientMessage(playerid, -1, "Essa conta não está registrada");
- SetTimer("esperarKick", 200, false);
- }
- return 1;
- }
- public esperarKick(playerid){
- Kick(playerid);
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "Spawnado");
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if (dialogid == DIALOG_LOGIN){
- if(response){
- if (isnull(inputtext)){
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Digite sua senha:", "Confirmar", "Sair");
- }
- else{
- if (!strcmp(inputtext, "123", 0)){
- SendClientMessage(playerid, -1, "Você logou com sucesso.");
- spawn(playerid);
- }
- else{
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Digite sua senha:", "Confirmar", "Sair");
- }
- }
- }
- else{
- Kick(playerid);
- }
- return 1;
- }
- if (dialogid == DIALOGO_PRIMEIRO){
- if(response){
- SendClientMessage(playerid, -1, "Eu que agradeço");
- }
- else{
- SendClientMessage(playerid, -1, "Vai você.");
- }
- return 1;
- }
- if (dialogid == DIALOG_BUYWEAPON){
- if (response){
- switch(listitem){
- case 0: SendClientMessage(playerid, -1, "Desert");
- }
- }
- else{
- SendClientMessage(playerid, -1, "Adeus, então...");
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- CMD:createcar(playerid, params[]){
- new id;
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "Use /createcar [id]");
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- CreateVehicle(id, x+2, y, z, -1, 0, 0, -1, 0);
- new string[128];
- format(string, sizeof(string), "Veículo %d criado com sucesso.", id); // permite
- SendClientMessage(playerid, -1, string);
- return 1;
- }
- CMD:spawn(playerid, params[]){
- spawn(playerid);
- return 1;
- }
- CMD:dialog(playerid, params[]){
- ShowPlayerDialog(playerid, DIALOGO_PRIMEIRO, DIALOG_STYLE_MSGBOX, "Dialog", "Seje bem vindo ao servidor", "Obrigado", "Vai se foder");
- }
- CMD:buyweapon(playerid, params[]){
- if(IsPlayerInRangeOfPoint(playerid, 1.2, BuyWeaponX, BuyWeaponY, BuyWeaponZ)){
- SendClientMessage(playerid, -1, "Você está próximo ao ponto de venda");
- ShowPlayerDialog(playerid, DIALOG_BUYWEAPON, DIALOG_STYLE_TABLIST_HEADERS, "Buy Weapon", "Arma\tMunição\tPreço Arma\nDesert\t100\t5000", "Comprar", "Cancelar");
- }
- else{
- SendClientMessage(playerid, -1, "Você não está proximo a um ponto de venda");
- }
- return 1;
- }
- CMD:farmar(playerid, params[]){
- SetTimer("farmar", 10000, true);
- return 1;
- }
- public farmar(playerid){
- GivePlayerMoney(playerid, 10000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement