Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Gamemode bare editado, créditos para os originais autores. (c) SA-MP
- #include <a_samp>
- #if defined MAX_GANG_ZONES
- #undef MAX_GANG_ZONES
- #endif
- // Economizando memória
- #define MAX_GANG_ZONES 2
- // Importando a include
- #include <dzones>
- // Variavel global para armazenar o ID da gangzone
- new g_los_santos_zone;
- main()
- {
- print("\n----------------------------------");
- print(" (Bare) Test Script by SA-MP Team\n");
- print(" Editado por Larceny\n");
- print("----------------------------------\n");
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new idx;
- new cmd[256];
- cmd = strtok(cmdtext, idx);
- // Comando para ir para a area criada
- if(strcmp(cmd, "/irarea", true) == 0) {
- ShowDynamicZoneForPlayer( playerid, g_los_santos_zone );
- SetPlayerPos( playerid, 1482.26, -1650.28, 15.0 );
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterDynamicZone(playerid, zoneid)
- {
- SendClientMessage(playerid, -1, "Bem-vindo a gangzone, você faz ela piscar!");
- FlashDynamicZoneForPlayer(playerid, g_los_santos_zone, 0xFF00007F);
- return 1;
- }
- public OnPlayerExitDynamicZone(playerid, zoneid)
- {
- SendClientMessage(playerid, -1, "Você saiu da gangzone, ela não vai piscar mais.");
- StopFlashDynamicZoneForPlayer(playerid, g_los_santos_zone);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerInterior(playerid,0);
- TogglePlayerClock(playerid,0);
- return 1;
- }
- SetupPlayerForClassSelection(playerid)
- {
- SetPlayerInterior(playerid,14);
- SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
- SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetupPlayerForClassSelection(playerid);
- return 1;
- }
- public OnGameModeInit()
- {
- SetGameModeText("Bare Script");
- AddPlayerClass(299,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
- // Criando a gangzone no departamento de policia de Los Santos
- g_los_santos_zone = CreateDynamicZone( 1444.231, -1741.078, 1539.302, -1595.012, 0xFFFFFF7F );
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement