Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new _var[10][10] = {
- {1, 1, 0, 0, 0, 0, 0, 0, 1, 1},
- {0, 1, 1, 0, 0, 1, 1, 1, 1, 1},
- {0, 1, 0, 1, 1, 0, 1, 0, 0, 0},
- {1, 1, 0, 1, 1, 1, 0, 1, 1, 1},
- {0, 0, 0, 1, 1, 1, 1, 1, 1, 0},
- {0, 1, 0, 0, 0, 1, 1, 0, 1, 1},
- {1, 1, 1, 0, 1, 1, 0, 0, 1, 1},
- {1, 1, 0, 1, 0, 0, 0, 0, 1, 1},
- {0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
- {0, 0, 1, 0, 1, 0, 0, 0, 0, 0}
- };
- static _soma = 2;
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- verificar(t,x) {
- _var[t][x] = _soma;
- if(x < 9 && _var[t][x+1] & 1) {
- verificar(t,x+1);
- }
- if(x > 0 && _var[t][x-1] & 1) {
- verificar(t,x-1);
- }
- if(t < 9 && _var[t+1][x] & 1) {
- verificar(t+1,x);
- }
- if(t > 0 && _var[t-1][x] & 1) {
- verificar(t-1,x);
- }
- return 1;
- }
- public OnGameModeInit()
- {
- static t = 0, x;
- do
- {
- printf("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
- _var[t][0],
- _var[t][1],
- _var[t][2],
- _var[t][3],
- _var[t][4],
- _var[t][5],
- _var[t][6],
- _var[t][7],
- _var[t][8],
- _var[t][9]);
- }
- while (++t < 10);
- for(t = 0; t!=10; t++) {
- for(x = 0; x!=10; x++) {
- if(_var[t][x] & 1) {
- verificar(t,x);
- _soma ++;
- }
- }
- }
- t = 0;
- print("\n\n");
- do
- {
- printf("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
- _var[t][0],
- _var[t][1],
- _var[t][2],
- _var[t][3],
- _var[t][4],
- _var[t][5],
- _var[t][6],
- _var[t][7],
- _var[t][8],
- _var[t][9]);
- }
- while (++t < 10);
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement