Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- new val = 7;
- new _a = 0;
- new _c = 0;
- new _type = 0;
- new _xvar[32][32];
- for(;;) {
- if(_a == val*val)
- break;
- switch(_type) {
- case 0: {
- for(new l=0+_c; l!=val; l++) {
- if(_xvar[_c][l] != 0) continue;
- _xvar[_c][l] = ++_a;
- }
- _type ++;
- }
- case 1: {
- for(new l=1; l!=val-_c; l++) {
- if(_xvar[l][val-1-_c] != 0) continue;
- _xvar[l][val-1-_c] = ++_a;
- }
- _type ++;
- }
- case 2: {
- for(new l=val-1; l!=-1+_c; l--) {
- if(_xvar[val-1-_c][l] != 0) continue;
- _xvar[val-1-_c][l] = ++_a;
- }
- _type ++;
- }
- case 3: {
- for(new l=val-1-_c; l!=-1; l--) {
- if(_xvar[l][_c] != 0) continue;
- _xvar[l][_c] = ++_a;
- }
- _type = 0;
- _c ++;
- }
- }
- }
- new sms[5];
- new _sms[64];
- for(new i=0; i!=val; i++) {
- strdel(_sms, 0 ,64);
- for(new s=0; s!=val; s++) {
- format(sms,15,"%d, ",_xvar[i][s]);
- strcat(_sms, sms);
- }
- print(_sms);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement