Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Bare script edited, thanks to the original author.*/
- #include <a_samp>
- #if defined MAX_GANG_ZONES
- #undef MAX_GANG_ZONES
- #endif
- #define MAX_GANG_ZONES 2
- #include <dzones>
- new g_los_santos_zone;
- main()
- {
- print("\n----------------------------------");
- print(" (Bare) Test Script\n");
- print("----------------------------------\n");
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new idx;
- new cmd[256];
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/gotoarea", 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, "Welcome to the zone, you make it flash.");
- FlashDynamicZoneForPlayer(playerid, g_los_santos_zone, 0xFF00007F);
- return 1;
- }
- public OnPlayerExitDynamicZone(playerid, zoneid)
- {
- SendClientMessage(playerid, -1, "You quit the zone, it won't flash anymore.");
- 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);
- 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